I have an imported MSBuild project (appconfig.transformation.targets) that defines some tasks and puts them in the BuildDependsOn property. I've placed this file in the top level folder for a solution (Projects\LibrariesSolution\appconfig.transformation.targets):
<PropertyGroup>
<BuildDependsOn>
TransformWebConfig;
OverrideAppConfigWithTargetPath;
$(BuildDependsOn);
CopyTransformedConfig
</BuildDependsOn>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets" />
I import this project in each csproj file inside the solution in subfolders. So Projects\LibrariesSolution\Project1\Project1.csproj has something like this:
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Import Project="..\appconfig.transformation.targets" />
... the rest of the csproj stuff ...
I launch the build like so:
cd LibrariesSolution
c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Clean /p:Configuration=Release Project1\Project1.csproj
c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Build /p:Configuration=Release Project1\Project1.csproj
But the targets listed in BuildDependsOn do not appear to be called. Of course the output is way too verbose to show here, but "TransformWebConfig" does not appear anywhere in the output. No errors are shown. What could be wrong? What should I do to troubleshoot the process further?