0
我发现这样here.怎样的ItemGroup转换成的PropertyGroup在MSBUILD
了类似的问题,但这并不解决我的问题。我有这样
<ItemGroup>
<DocumentationSource Include="TestLibrary\TestLibrary.csproj;TestLibrary2\TestLibrary2.csproj;TestLibrary2\TestLibrary3.csproj" />
</ItemGroup>
一个的ItemGroup我需要按此格式
<PropertyGroup>
<DocumentationSources>
<DocumentationSource sourceFile="TestLibrary\TestLibrary.csproj" />
<DocumentationSource sourceFile="TestLibrary2\TestLibrary2.csproj" />
<DocumentationSource sourceFile="TestLibrary2\TestLibrary3.csproj" />
</DocumentationSources>
</PropertyGroup>
我使用沙塔文档构建生成文件变成这样的PropertyGroup。这需要我以PropertyGroup格式显示的文档源。但是在我的构建脚本中,我已经有了一个ItemGroup,它具有上述格式中提到的所有项目。
如何在此处使用该ItemGroup作为SandCastle的文档来源或如何将ItemGroup转换为以上格式的PropertyGroup?
其实我可以改变的ItemGroup到的PropertyGroup格式,但已经有一些逻辑动态形成这样
<_ProjectFilesPlatform Include="%(ProjectDefinitionsPlatform.Identity)">
<_ProjectPath>$([System.String]::Copy(%(ProjectDefinitionsPlatform.Identity)).Replace(".","\"))</_ProjectPath>
</_ProjectFilesPlatform>
[这是一个粗略的轮廓我给了这里。这个操作不是实际使用的]
我是这个MSBUILD脚本的新手。任何人都可以对此有所了解吗?
谢谢。
非常感谢你的男人。这是我正在寻找的。 – shanmugharaj