Can't figure out how to get the last part of
$(MSBuildProjectDirectory)
For example, if the value was "c:\development\projects\project_branch" then, I want just the last part "project_branch".
Any ideas?
Thanks,
Sean
Can't figure out how to get the last part of
$(MSBuildProjectDirectory)
For example, if the value was "c:\development\projects\project_branch" then, I want just the last part "project_branch".
Any ideas?
Thanks,
Sean
<Project DefaultTargets="BuildAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GetMSBuildProjectLocalDirectory">
<CreateItem Include="$(MSBuildProjectDirectory)">
<Output ItemName="MSBuildProjectDirectoryMeta" TaskParameter="Include"/>
</CreateItem>
<CreateProperty Value="%(MSBuildProjectDirectoryMeta.Filename)">
<Output PropertyName="LocalDirectory" TaskParameter="Value"/>
</CreateProperty>
</Target>
<Target Name="BuildAll" DependsOnTargets="GetMSBuildProjectLocalDirectory">
<Message Text="$(LocalDirectory)" />
</Target>
</Project>