1
当一个C#项目引用另一个C#项目(如一个lib)访问项目,Visual Studio中增加了一些类似这样的项目文件:中引用的项目
<ItemGroup>
<ProjectReference Include="..\some\path\lib.csproj">
<Project>{4beb6b28-90f5-77c3-af2a-f5fa3336dac9}</Project>
<Name>Lib</Name>
</ProjectReference>
</ItemGroup>
假设,lib.csproj
包含一些类似的商品:
<SpecialFile Include="foo.dll" />
<SpecialFile Inclued="bar.txt" />
如何在第一个项目文件中访问这些SpecialFile
项目?我想要做这样的事情:
<Target Name="SpecialFileCopyTarget" AfterTargets="AfterBuild">
<Copy
DestinationFolder="$(OutputPath)"
SourceFiles="@(SpecialFile)" <-- ?????
SkipUnchangedFiles="true" />
</Target>
我想我不想Import
的lib.csproj
,刚刚得到的物品莫名其妙。