I want to extend my local build process in .csproj.user
file which is not tracked within our git repository. Previously I used PostBuildEvent
but suddenly I discover that it does not work well with variables: https://github.com/dotnet/sdk/issues/677
Works from both .csproj
and .csproj.user
but cannot have variables:
<PostBuildEvent>xcopy "C:\workspace\project\bin\Debug\my.dll" "C:\Program\bin" /y</PostBuildEvent>
Works only if placed in the end of .csproj
but not in .csproj.user
:
<Target Name="AfterBuild">
<Copy SourceFiles="$(ProjectDir)\$(OutputPath)\my.dll" DestinationFolder="C:\Program\bin" />
</Target>
Also I tried to debug it with simple <Message>
instead of <Copy>
with same result.
Is there a way to make it work in my .csproj.user
?