The next MSBuild call works fine when used in the independent MSBuild project, LocalPublish.xml.
<MSBuild
Projects="MyProject.Web.csproj"
Targets="ResolveReferences;_CopyWebApplication"
Properties="WebProjectOutputDir=C:\Inetpub\MyProject\Website;OutDir=C:\Inetpub\MyProject\Website\bin\" />
In the past, we called it using the command line of the Post-build event: $ (MSBuildBinPath) \ msbuild "$ (ProjectDir) LocalPublish.xml"
However, now I am trying to integrate this into the AfterBuild event in MyProject.Web.csproj, and it cannot copy the links to the project DLL into the bin folder of the publication path. I tried adding BuildingProject = true to the Properties attribute as suggested here , but it doesn't seem to matter.
source
share