Skip to content

Don't require latest runtime patch for Blazor DevServer #56123

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

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

halter73
Copy link
Member

@halter73 halter73 commented Jun 7, 2024

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, you’ll see the following error:

Process with Id of {ID} is not running error

Similar reports come into VS feedback and GitHub pretty regularly with every patch. 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).

If you 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.

I think we should consider backporting at least the first commit to release/8.0. The second commit deletes MicrosoftAspNetCoreAppVersion which was out of date and apparently not used for anything important. @sebastienros I found this reference to BasicApi.csproj in one of our benchmark jobs, but the path is incorrect (it doesn't include the "perf/" directory), so I deleted the outdated PackageReference that was intended to assist with benchmarking. We could put it back but use SharedFxVersion or something similar if we need it.

Fixes #56119

@halter73 halter73 requested review from captainsafia and javiercn June 7, 2024 19:06
@halter73 halter73 requested review from a team, BrennanConroy and wtgodbe as code owners June 7, 2024 19:06
@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jun 7, 2024
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the dev server bits

@halter73 halter73 merged commit a3990b7 into main Jun 10, 2024
26 checks passed
@halter73 halter73 deleted the halter73/56119 branch June 10, 2024 22:05
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview6 milestone Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating Microsoft.AspNetCore.Components.WebAssembly from 8.0.5 to 8.0.6 breaks Blazor Webassembly application
3 participants