admin/Directory.Build.targets
2026-10-19 15:08:05 +08:00

27 lines
1.3 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>