Skip to content

Commit 6c29f44

Browse files
authored
Reduce references to Microsoft.AspNetCore.App.Runtime.csproj (#25836)
- dotnet-watch builds against runtime in the SDK - other projects build after runtime project due to Ref.csproj reference - but, when the targeting packs aren't building, there's no reason to use Ref.csproj - followup on 76fbd1a and 8496266, reducing parallelism in build
1 parent 6b8ce80 commit 6c29f44

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@
5151
</ItemGroup>
5252

5353
<ItemGroup>
54-
<ProjectReference Include="..\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj">
54+
<ProjectReference Include="..\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj"
55+
Condition=" $(IsTargetingPackBuilding) ">
5556
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
5657
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
5758
</ProjectReference>
58-
<ProjectReference Include="..\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj">
59+
<ProjectReference Include="..\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
60+
Condition=" !$(IsTargetingPackBuilding) ">
5961
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
6062
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
6163
</ProjectReference>

src/SiteExtensions/LoggingBranch/LB.csproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,21 @@
1616
<IncludeSymbols>false</IncludeSymbols>
1717
<NoSemVer20>true</NoSemVer20>
1818
<IsShippingPackage>false</IsShippingPackage>
19-
19+
2020
<!-- No source files -->
2121
<NoWarn>$(NoWarn);CS2008</NoWarn>
2222
</PropertyGroup>
2323

2424
<ItemGroup>
2525
<HostingStartupRuntimeStoreTargets Include="$(DefaultNetCoreTargetFramework)" Runtime="$(TargetRuntimeIdentifier)" />
2626

27-
<ProjectReference Include="..\..\Framework\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj">
27+
<ProjectReference Include="..\..\Framework\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj"
28+
Condition=" $(IsTargetingPackBuilding) ">
2829
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
2930
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
3031
</ProjectReference>
31-
<ProjectReference Include="..\..\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj">
32+
<ProjectReference Include="..\..\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
33+
Condition=" !$(IsTargetingPackBuilding) ">
3234
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
3335
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
3436
</ProjectReference>

src/Tools/dotnet-watch/src/dotnet-watch.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
<ItemGroup>
3030
<FrameworkReference Include="Microsoft.AspNetCore.App" />
3131

32-
<ProjectReference
33-
Include="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
34-
PrivateAssets="All"
35-
ReferenceOutputAssembly="false"
36-
SkipGetTargetFrameworkProperties="true" />
37-
3832
<Reference
3933
Include="Microsoft.AspNetCore.Watch.BrowserRefresh"
4034
PrivateAssets="All"

0 commit comments

Comments
 (0)