Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trunk/MainSolution.sln
- trunk/Build/MyBuild.Proj
- trunk/Library/...
- trunk/etc...
- <RootFolder>$(MSBuildProjectDirectory)..</RootFolder>
- C:ProjectsMyProjectTrunkBuild..CodeAnalysismyfile.xml
- <Target Name="GetMSBuildProjectParentDirectory">
- <!-- First you create the MSBuildProject Parent directory Item -->
- <CreateItem Include="$(MSBuildProjectDirectory)..">
- <Output ItemName="MSBuildProjectParentDirectory" TaskParameter="Include"/>
- </CreateItem>
- <!-- You can now retrieve its fullpath using Fullpath metadata -->
- <Message Text="%(MSBuildParentDirectory.Fullpath)"/>
- <!-- Create a property based on parent fullpath-->
- <CreateProperty Value="%(MSBuildParentDirectory.Fullpath)">
- <Output PropertyName="CodeFolder" TaskParameter="Value"/>
- </CreateProperty>
- </Target>
Add Comment
Please, Sign In to add comment