Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/8.0] Don't require latest runtime patch for Blazor DevServer #56181

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

halter73
Copy link
Member

@halter73 halter73 commented Jun 10, 2024

Don't require latest runtime patch for Blazor DevServer

This fixes a failure to launch the Blazor DevServer when a project's Microsoft.AspNetCore.Components.WebAssembly.DevServer NuGet dependency has a new patch version than the aspnetcore runtime provided by the SDK.

Description

This is a backport of DevServer changes from #56123 for release/8.0.

If you have not installed an SDK with the 8.0.6 runtimes, but you reference the 8.0.6 version of the Microsoft.AspNetCore.Components.WebAssembly.DevServer NuGet dependency, and try to dotnet run the project, you’ll see the following output:

You must install or update .NET to run this application.

App: C:\.tools\.nuget\packages\microsoft.aspnetcore.components.webassembly.devserver\8.0.6\tools\blazor-devserver.dll
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '8.0.6' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  6.0.30 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  8.0.5 at [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=8.0.6&arch=x64&rid=win-x64&os=win10

C:\Program Files\dotnet\dotnet.exe (process 12924) exited with code -2147450730 (0x80008096).
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
  

You can work around this issue by installing the 8.0.301 SDK from https://dotnet.microsoft.com/en-us/download/dotnet/8.0 that brings in the 8.0.6 runtime. Or you can downgrade the Microsoft.AspNetCore.Components.WebAssembly.DevServer NuGet dependency to 8.0.5.

However, it ought not be necessary for the NuGet dependency to exactly align with the runtime patch version. dotnet/runtime#88204 (comment) has more context.

Fixes #56119

Customer Impact

If a customer tries to use an older SDK with a newer version of the Microsoft.AspNetCore.Components.WebAssembly.DevServer NuGet dependency, they'll see the following error in Visual Studio:

Process with Id of {ID} is not running error

Similar reports come into VS feedback and GitHub pretty regularly. VS does not seem to give any details other than the following in from the “Debug” output by default.

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.
The program ‘[720] dotnet.exe’ has exited with code 2147516566 (0x80008096).
The program ‘[720] dotnet.exe: Program Trace’ has exited with code 0 (0x0).

Regression?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low

It allows the dev server to work in environments where it would previously completely fail without easy-to-find debug info. The Blazor dev server is stable and only uses public API, so it does not require a specific runtime patch.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@halter73 halter73 requested a review from a team as a code owner June 10, 2024 22:30
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Jun 10, 2024
@halter73 halter73 added the Servicing-consider Shiproom approval is required for the issue label Jun 12, 2024
@mkArtakMSFT mkArtakMSFT added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Jun 12, 2024
@mkArtakMSFT mkArtakMSFT added this to the 8.0.x milestone Jun 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label Jun 25, 2024
@wtgodbe wtgodbe merged commit a2c24f9 into dotnet:release/8.0 Jul 2, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 8.0.x, 8.0.8 Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants