I have a property GroupProjthat saves the full path name. How can I extract a property directory?
I have the following code, but it does not work properly:
<PropertyGroup>
<GroupProj>C:\development\project\default.groupproj</GroupProj>
</PropertyGroup>
<Target Name="Default">
<Message Text="Echo: $(GroupProj->'%(RootDir)')" />
</Target>
I will describe my actual intention to do this. Perhaps there is a way to do a job that I don't know about.
I have a project Delphigroupproj (MSBuild project) C:\development\project\default.groupproj:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Projects Include="project1.dproj">
<Dependencies/>
</Projects>
<Projects Include="project2.dproj">
<Dependencies/>
</Projects>
<Projects Include="project3.dproj">
<Dependencies/>
</Projects>
</ItemGroup>
...
</Project>
There are other 3 MSBuildfiles ( project1.dproj, project2.dprojand project3.dproj) stored in the same folder as default.groupproj.
I create a project file MSBuild(c: \ test.targets):
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build" ToolsVersion="3.5">
<Import Project="$(GroupProj)" />
<Target Name="Build">
<MSBuild BuildInParallel="True" Projects="project1.dproj;project2.dproj;project3.dproj"/>
</Target>
</Project>
And do as:
c:\> msbuild /p:GroupProj="C:\development\project\default.groupproj" test.targets
Execution is not performed because MSBuildit cannot find the file projectN.dproj. The problem is that the working directory is not installed on default.groupproj.
, $(GroupProj) concat projectN.dproj .
.