Tod*_*ain 5 msbuild silverlight
我想使用MSBuild来抓取并创建2个文件的相关元素.如果它只是一个文件扩展名,我会使用:
<ItemGroup>
<Compile Include="\Pages\*.cs" />
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
在用于Silverlight构建的.csproj文件中,每个UserControl都设置为与其自己的<Compile>元素和子<DependentUpon>元素一样:
<ItemGroup>
<Compile Include="Pages\SilverlightControl1.xaml.cs">
<DependentUpon>SilverlightControl1.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\SilverlightControl2.xaml.cs">
<DependentUpon>SilverlightControl2.xaml</DependentUpon>
</Compile>
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
在MSBuild文件中,我想指定:
获取所有
.cs文件并将其放入Include属性中并获取相同的文件名 - 减去.cs并将其放入<DependentUpon>元素中.
所以它就像(伪)匹配文件对:
<ItemGroup>
<Compile Include="Pages\*.cs">
<DependentUpon>Pages\*.xaml</DependentUpon>
</Compile>
</ItemGroup>
Run Code Online (Sandbox Code Playgroud)
有没有办法把上面的内容放在MSBuild中?
| 归档时间: |
|
| 查看次数: |
1017 次 |
| 最近记录: |