Skip to content

Commit

Permalink
[release/8.0] Don't require latest runtime patch for Blazor DevServer (
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
halter73 committed Jul 2, 2024
1 parent ada17d6 commit a2c24f9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@

<Target Name="_CreateRuntimeConfig" BeforeTargets="CoreBuild">
<PropertyGroup>
<_RuntimeConfigProperties>
SharedFxVersion=$(SharedFxVersion);
<_RuntimeConfigProperties Condition="'$(IsServicingBuild)' == 'true'">
FrameworkVersion=$(AspNetCoreMajorMinorVersion).0;
</_RuntimeConfigProperties>
<_RuntimeConfigProperties Condition="'$(IsServicingBuild)' != 'true'">
FrameworkVersion=$(SharedFxVersion);
</_RuntimeConfigProperties>

<_RuntimeConfigPath>$(OutputPath)blazor-devserver.runtimeconfig.json</_RuntimeConfigPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tfm": "net8.0",
"framework": {
"name": "Microsoft.AspNetCore.App",
"version": "${SharedFxVersion}"
"version": "${FrameworkVersion}"
},
"rollForwardOnNoCandidateFx": 2
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<ProjectReference
Include="..\testassets\Components.TestServer\Components.TestServer.csproj"
Targets="Build;Publish"
Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed-or-threading\Components.TestServer\;" />
Properties="BuildProjectReferences=false;TestTrimmedOrMultithreadingApps=true;PublishDir=$(MSBuildThisFileDirectory)$(OutputPath)trimmed\Components.TestServer\;" />
</ItemGroup>

<!-- Shared testing infrastructure for running E2E tests using selenium -->
Expand Down
4 changes: 2 additions & 2 deletions src/Components/test/E2ETest/Tests/RemoteAuthenticationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class RemoteAuthenticationTest :
{
public readonly bool TestTrimmedApps = typeof(ToggleExecutionModeServerFixture<>).Assembly
.GetCustomAttributes<AssemblyMetadataAttribute>()
.First(m => m.Key == "Microsoft.AspNetCore.E2ETesting.TestTrimmedOrMultithreadingApps")
.First(m => m.Key == "Microsoft.AspNetCore.E2ETesting.TestTrimmedApps")
.Value == "true";

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

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

if (!Directory.Exists(contentRoot))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void WaitUntilLoaded()

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

if (!Directory.Exists(contentRoot))
{
Expand Down

0 comments on commit a2c24f9

Please sign in to comment.