$ (TargetPath) not evalutated when loading a macro?
, custom.props Microsoft.Cpp.targets:
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="Custom.props" />
, , Microsoft.Cpp.Current.targets:
<Target Name="SetUserMacroEnvironmentVariables"
Condition="'@(BuildMacro)' != '' and '$(DesignTimeBuild)' != 'true'">
<SetEnv Condition="'%(BuildMacro.EnvironmentVariable)' == 'true'"
Name ="@(BuildMacro)"
Value ="%(BuildMacro.Value)"
Prefix ="false">
<Output TaskParameter="OutputEnvironmentVariable" PropertyName="%(BuildMacro.Identity)"/>
</SetEnv>
</Target>
Microsoft.Cpp.Current.targets Microsoft.Cpp.targets:
<Import Condition="'$(_Redirect)' != 'true'" Project="$(VCTargetsPath)\Microsoft.Cpp.Current.targets" />
, , - Microsoft.Cpp.targets, MSBuild .
.targets :
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VC\VCTargets
VST2_32_COMMAND_ARGS, . , :
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Import Project="Custom.props" />
<Target Name="TestByCustom" AfterTargets="Build">
<Message Text="$(VST2_32_COMMAND_ARGS)"></Message>
</Target>
$(TargetPath):

custom.props:
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VST2_32_COMMAND_ARGS>"$(TargetPath)" /noload /nosave /noexc /noft</VST2_32_COMMAND_ARGS>
</PropertyGroup>
</Project>
, .