Skip to content

Commit b58af16

Browse files
committed
Get Components.WebAssembly.DevServer project building
- use the just-built Microsoft.AspNetCore.App - cannot use one from SDK _and_ reference Microsoft.AspNetCore.Components.WebAssembly.Server
1 parent 5be5f76 commit b58af16

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project>
2+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
23

34
<PropertyGroup>
45
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
@@ -13,21 +14,24 @@
1314
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
1415

1516
<!--
16-
This project compiles against Microsoft.AspNetCore.App from the SDK.
17+
This project compiles against Microsoft.AspNetCore.App that's just been built, not the one in the SDK.
1718
This ensures that it's packaging output is correct and does not include local artifacts.
1819
-->
1920
<UseAspNetCoreSharedRuntime>true</UseAspNetCoreSharedRuntime>
20-
<DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>true</DoNotApplyWorkaroundsToMicrosoftAspNetCoreApp>
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<FrameworkReference Include="Microsoft.AspNetCore.App" />
25-
26-
<ProjectReference
27-
Include="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj"
28-
PrivateAssets="All"
29-
ReferenceOutputAssembly="false"
30-
SkipGetTargetFrameworkProperties="true" />
24+
<!-- Ensure "just been built" is correct. -->
25+
<ProjectReference Include="$(RepoRoot)src\Framework\App.Ref\src\Microsoft.AspNetCore.App.Runtime.csproj"
26+
Condition=" ! $(IsTargetingPackBuilding) "
27+
PrivateAssets="All"
28+
ReferenceOutputAssembly="false"
29+
SkipGetTargetFrameworkProperties="true" />
30+
<ProjectReference Include="$(RepoRoot)src\Framework\App.Ref\src\Microsoft.AspNetCore.App.Ref.csproj"
31+
Condition=" $(IsTargetingPackBuilding) "
32+
PrivateAssets="All"
33+
ReferenceOutputAssembly="false"
34+
SkipGetTargetFrameworkProperties="true" />
3135

3236
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
3337
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
@@ -45,5 +49,10 @@
4549
<NuspecProperty Include="PackageThirdPartyNoticesFile=$(PackageThirdPartyNoticesFile)" />
4650
</ItemGroup>
4751

52+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
4853

54+
<ItemGroup>
55+
<!-- Safe to add @(FrameworkReference) item after normal removal is behind us. -->
56+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
57+
</ItemGroup>
4958
</Project>

0 commit comments

Comments
 (0)