Skip to content

Commit 1238c85

Browse files
authored
Build against the 3.1.0 AspNetCore (#18970)
* Build against the 3.1.0 AspNetCore The version of the runtime that projects compile against is stamped in to the runtimeconfig.json. In an earlier change, the AspNetCoreRef version was bumped up to 3.1.2 which causes running dotnet dev-serve to fail if you do not have the runtime installed. In addition, the template json allows roll-forwards to major version (5.0 versions) if that's the only version available. We do this with the razor compiler: https://github.com/dotnet/aspnetcore-tooling/blob/master/src/Razor/src/Microsoft.AspNetCore.Razor.Tools/runtimeconfig.template.json
2 parents 376f378 + fd9f203 commit 1238c85

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
<!-- This is so that we add the FrameworkReference to Microsoft.AspNetCore.App -->
1616
<UseLatestAspNetCoreReference>true</UseLatestAspNetCoreReference>
17+
<MicrosoftAspNetCoreAppVersion>3.1.0</MicrosoftAspNetCoreAppVersion>
1718
</PropertyGroup>
1819

1920
<ItemGroup>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rollForwardOnNoCandidateFx": 2
3+
}

src/Components/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<!-- This property points to the latest released Microsoft.AspNetCore.App version it needs to be updated to
1616
target the latest patch before a preview release. -->
17-
<LatestAspNetCoreReferenceVersion>3.1.2</LatestAspNetCoreReferenceVersion>
17+
<LatestAspNetCoreReferenceVersion>$(MicrosoftAspNetCoreAppRefPackageVersion)</LatestAspNetCoreReferenceVersion>
1818

1919
<ComponentsSharedSourceRoot>$(MSBuildThisFileDirectory)Shared\</ComponentsSharedSourceRoot>
2020

src/Components/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<KnownFrameworkReference Include="Microsoft.AspNetCore.App">
1313
<TargetFramework>netcoreapp3.1</TargetFramework>
1414
<RuntimeFrameworkName>Microsoft.AspNetCore.App</RuntimeFrameworkName>
15-
<DefaultRuntimeFrameworkVersion>$(LatestAspNetCoreReferenceVersion)</DefaultRuntimeFrameworkVersion>
16-
<LatestRuntimeFrameworkVersion>$(LatestAspNetCoreReferenceVersion)</LatestRuntimeFrameworkVersion>
15+
<DefaultRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppVersion)</DefaultRuntimeFrameworkVersion>
16+
<LatestRuntimeFrameworkVersion>$(MicrosoftAspNetCoreAppVersion)</LatestRuntimeFrameworkVersion>
1717
<TargetingPackName>Microsoft.AspNetCore.App.Ref</TargetingPackName>
1818
<TargetingPackVersion>$(LatestAspNetCoreReferenceVersion)</TargetingPackVersion>
1919
<RuntimePackNamePatterns>Microsoft.AspNetCore.App.Runtime.**RID**</RuntimePackNamePatterns>

0 commit comments

Comments
 (0)