When I add a post build event to my project and try to use a macro in the Edit Post-Build ... section it shows the value of each macro
However when the build runs the value show blank
the following was generated using echo "The project path is:" $(ProjectPath) "end of path"
any macro value I use seems to come up null
I am using the following csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework>
<AssemblyName>Client</AssemblyName>
<PackageId>Client</PackageId>
<PackageTags>pkgname</PackageTags>
<NetStandardImplicitPackageVersion>1.6.1</NetStandardImplicitPackageVersion>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PostBuildEvent>
echo on
echo "The project path is:" $(ProjectPath) "end of path"
dotnet pack $(ProjectPath)
</PostBuildEvent>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NoSQL" Version="1.0.4.3" />
</ItemGroup>
</Project>
I have tried manually editing the csproj to no avail. a full path to the csproj in the post build event does work.
I have confirmed that this occurs on multiple machines running VS/15.0.0+26228.9