Links are not expanded when using ResolveReferences and _CopyWebApplication in AfterBuild

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.

+3
source share

Source: https://habr.com/ru/post/1782322/


All Articles