Skip to content

Commit a2c24f9

Browse files
authored
[release/8.0] Don't require latest runtime patch for Blazor DevServer (#56181)
* Don't require latest runtime patch for Blazor DevServer * Use exact runtime for non-servicing builds of Blazor DevServer * Publish to "trimmed" instead of "trimmed-or-threading" - This fixes a regression introduced by #54655
1 parent ada17d6 commit a2c24f9

5 files changed

+10
-7
lines changed

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@
3636

3737
<Target Name="_CreateRuntimeConfig" BeforeTargets="CoreBuild">
3838
<PropertyGroup>
39-
<_RuntimeConfigProperties>
40-
SharedFxVersion=$(SharedFxVersion);
39+
<_RuntimeConfigProperties Condition="'$(IsServicingBuild)' == 'true'">
40+
FrameworkVersion=$(AspNetCoreMajorMinorVersion).0;
41+
</_RuntimeConfigProperties>
42+
<_RuntimeConfigProperties Condition="'$(IsServicingBuild)' != 'true'">
43+
FrameworkVersion=$(SharedFxVersion);
4144
</_RuntimeConfigProperties>
4245

4346
<_RuntimeConfigPath>$(OutputPath)blazor-devserver.runtimeconfig.json</_RuntimeConfigPath>

src/Components/WebAssembly/DevServer/src/blazor-devserver.runtimeconfig.json.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"tfm": "net8.0",
44
"framework": {
55
"name": "Microsoft.AspNetCore.App",
6-
"version": "${SharedFxVersion}"
6+
"version": "${FrameworkVersion}"
77
},
88
"rollForwardOnNoCandidateFx": 2
99
}

src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<ProjectReference
9090
Include="..\testassets\Components.TestServer\Components.TestServer.csproj"
9191
Targets="Build;Publish"
92-
Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed-or-threading\Components.TestServer\;" />
92+
Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed\Components.TestServer\;" />
9393
</ItemGroup>
9494

9595
<!-- Shared testing infrastructure for running E2E tests using selenium -->

src/Components/test/E2ETest/Tests/RemoteAuthenticationTest.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class RemoteAuthenticationTest :
2121
{
2222
public readonly bool TestTrimmedApps = typeof(ToggleExecutionModeServerFixture<>).Assembly
2323
.GetCustomAttributes<AssemblyMetadataAttribute>()
24-
.First(m => m.Key == "Microsoft.AspNetCore.E2ETesting.TestTrimmedOrMultithreadingApps")
24+
.First(m => m.Key == "Microsoft.AspNetCore.E2ETesting.TestTrimmedApps")
2525
.Value == "true";
2626

2727
public RemoteAuthenticationTest(
@@ -67,7 +67,7 @@ private static IHost BuildPublishedWebHost(string[] args) =>
6767

6868
private static string GetPublishedContentRoot(Assembly assembly)
6969
{
70-
var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed-or-threading", assembly.GetName().Name);
70+
var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed", assembly.GetName().Name);
7171

7272
if (!Directory.Exists(contentRoot))
7373
{

src/Components/test/E2ETest/Tests/WebAssemblyPrerenderedTest.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private void WaitUntilLoaded()
5656

5757
private static string GetPublishedContentRoot(Assembly assembly)
5858
{
59-
var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed-or-threading", assembly.GetName().Name);
59+
var contentRoot = Path.Combine(AppContext.BaseDirectory, "trimmed", assembly.GetName().Name);
6060

6161
if (!Directory.Exists(contentRoot))
6262
{

0 commit comments

Comments
 (0)