Description
Using the default Blazor Server project and publishing with the command dotnet publish -c Release -r linux-arm -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishReadyToRunUseCrossgen2=true --self-contained=true -p:PublishSingleFile=true results in the following error after pressing the "Click Me" button on the "Counter" page.
blazor.server.js:1 Uncaught Error: No interop methods are registered for renderer 0
at k (blazor.server.js:1:11605)
at blazor.server.js:1:11511
at T (blazor.server.js:1:11694)
at I (blazor.server.js:1:11485)
at P.dispatchGlobalEventToAllElements (blazor.server.js:1:13974)
at P.onGlobalEvent (blazor.server.js:1:13233)
Problem doesn't seem to happen using -r win-x64.
Reproduction Steps
- Create a project using the default "Blazor Server" project template
- Publish with
dotnet publish -c Release -r linux-arm -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishReadyToRunUseCrossgen2=true --self-contained=true -p:PublishSingleFile=true
- Execute the project on a linux-arm device
- Open the page in a browser
- Navigate to the Counter page
- Press the "Click Me" button
- Inspect the browser's console
Expected behavior
Program execution without error.
Actual behavior
Program crash resulting in an error.
Regression?
I believe this was working in 6.0.101, and was introduced in 6.0.102, but I'm not able to verify that at this time.
Known Workarounds
Removing the -p:PublishSingleFile=true or all of the -p:PublishReadyToRun... parameters will create a working executable, but that negates the point of using those parameters.
Configuration
Project is built on a 64-bit Windows 10 computer using Visual Studio 2022
dotnet --info on the devlopment computer reports:
.NET SDK (reflecting any global.json):
Version: 6.0.102
Commit: 02d5242ed7
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.102\
Host (useful for support):
Version: 6.0.2
Commit: 839cdfb0ec
.NET SDKs installed:
3.1.100 [C:\Program Files\dotnet\sdk]
3.1.200 [C:\Program Files\dotnet\sdk]
3.1.301 [C:\Program Files\dotnet\sdk]
3.1.416 [C:\Program Files\dotnet\sdk]
5.0.403 [C:\Program Files\dotnet\sdk]
5.0.405 [C:\Program Files\dotnet\sdk]
6.0.100-preview.6.21355.2 [C:\Program Files\dotnet\sdk]
6.0.102 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview9.19424.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0-rc.1.20451.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-preview.6.21355.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0-rc.1.20451.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-preview.6.21352.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview9-19423-09 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0-rc.1.20452.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.12 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.6.21353.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
dotnet --info on the target computer reports:
.NET SDK (reflecting any global.json):
Version: 6.0.102
Commit: 02d5242ed7
Runtime Environment:
OS Name: raspbian
OS Version: 11
OS Platform: Linux
RID: linux-arm
Base Path: /opt/Microsoft/dotnet/sdk/6.0.102/
Host (useful for support):
Version: 6.0.2
Commit: 839cdfb0ec
.NET SDKs installed:
6.0.102 [/opt/Microsoft/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.2 [/opt/Microsoft/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.2 [/opt/Microsoft/dotnet/shared/Microsoft.NETCore.App]
Other information
No response
Description
Using the default Blazor Server project and publishing with the command
dotnet publish -c Release -r linux-arm -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishReadyToRunUseCrossgen2=true --self-contained=true -p:PublishSingleFile=trueresults in the following error after pressing the "Click Me" button on the "Counter" page.Problem doesn't seem to happen using
-r win-x64.Reproduction Steps
dotnet publish -c Release -r linux-arm -p:PublishReadyToRun=true -p:PublishReadyToRunComposite=true -p:PublishReadyToRunUseCrossgen2=true --self-contained=true -p:PublishSingleFile=trueExpected behavior
Program execution without error.
Actual behavior
Program crash resulting in an error.
Regression?
I believe this was working in 6.0.101, and was introduced in 6.0.102, but I'm not able to verify that at this time.
Known Workarounds
Removing the
-p:PublishSingleFile=trueor all of the-p:PublishReadyToRun...parameters will create a working executable, but that negates the point of using those parameters.Configuration
Project is built on a 64-bit Windows 10 computer using Visual Studio 2022
dotnet --infoon the devlopment computer reports:dotnet --infoon the target computer reports:Other information
No response