27 lines
1.3 KiB
XML
27 lines
1.3 KiB
XML
<Project>
|
||
<!--
|
||
UseLocalFake=true:每个 Fake.* PackageReference 换成本地工程。
|
||
NuGet 资产全部排除,避免同名 1.0.0.0 程序集盖掉本地输出。
|
||
-->
|
||
<ItemGroup Condition="'$(UseLocalFake)' == 'true'">
|
||
<PackageReference Update="Fake.*" ExcludeAssets="all" PrivateAssets="all" />
|
||
<_LocalFakeCandidate Include="@(PackageReference -> '$(FakeRepoRoot)\src\%(Identity)\%(Identity).csproj')" />
|
||
<_LocalFakeCandidate Include="@(PackageReference -> '$(FakeRepoRoot)\modules\rbac\%(Identity)\%(Identity).csproj')" />
|
||
<_LocalFakeCandidate Include="@(PackageReference -> '$(FakeRepoRoot)\modules\file-management\%(Identity)\%(Identity).csproj')" />
|
||
<!-- 变换会带上 PackageReference 的 ExcludeAssets/PrivateAssets,必须清掉,否则传递引用进不了编译。 -->
|
||
<ProjectReference Include="@(_LocalFakeCandidate)">
|
||
<ExcludeAssets></ExcludeAssets>
|
||
<PrivateAssets></PrivateAssets>
|
||
</ProjectReference>
|
||
</ItemGroup>
|
||
|
||
<Target Name="DropMissingLocalFakeProjects"
|
||
BeforeTargets="AssignProjectConfiguration"
|
||
Condition="'$(UseLocalFake)' == 'true'">
|
||
<ItemGroup>
|
||
<_MissingLocalFake Include="@(_LocalFakeCandidate)" Condition="!Exists('%(Identity)')" />
|
||
<ProjectReference Remove="@(_MissingLocalFake)" />
|
||
</ItemGroup>
|
||
</Target>
|
||
</Project>
|