Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When trying to run a .net6.0 web application under IIS (InProcess) on Windows 11 ARM64 the following 500.31 error occurs.
The weird part is that it is searching for the "6.0.o" version (arm64) - with the letter "o" at the end.
The setup:
- MacBook Pro with M1 Chip running Parallels v17.1.4
- Windows 11 Enterprise ARM64 - version 10.0.22000
- Visual Studio 2022 Professional 17.3 Preview 2 (ARM64)
HTTP Error 500.31 - Failed to load ASP.NET Core runtime
Common solutions to this issue:
The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
Specific error detected by ANCM:
You must install or update .NET to run this application. App: C:\{appdir}\bin\Debug\net6.0\WebApplication3.dll
Architecture: arm64 Framework: 'Microsoft.NETCore.App', version '6.0.o' (arm64)
.NET location: C:\Program Files\dotnet\
The following frameworks were found:
6.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
7.0.0-preview.5.22301.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Learn about framework resolution: https://aka.ms/dotnet/app-launch-failed To install missing framework, download: https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.o&arch=arm64&rid=win10-arm64
Meanwhile .net7.0 applications are working properly under IIS (InProcess) without x64/arm emulation enabled.
Only .net6.0 apps cannot start (with or without emulation), built with AnyCPU or dedicated for either x64 or arm64?
Apparently, this .NET SDK 6.0.400-preview.22301.10 installs the 6.0.5 runtime, at least it does according to the output of dotnet --info
(see below).
I've tried manually installing:
- .net6.0 hosting bundle
- .net6.0 runtime (the latest version)
- both combinations only as arm64, then both as arm64 & x64, then only x64 and tried to run the x64 app with emulation
... but no luck :(
I cannot figure out why it searches for 6.0.o version (which is obviously not there).
Unfortunately, it doesn't look like you can uninstall the preview SDKs that ship with VS Preview, because that will basically uninstall the VS altogether.
Any ideas? What am I missing?
It would be great if I could run at least .net6.0 (arm64) apps like this, not to mention x64 or older editions.
stdout
log output at failed launch:
You must install or update .NET to run this application.
App: C:\_webs\test\WebApplication\WebApplication\bin\Debug\net6.0\WebApplication.dll
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '6.0.o' (arm64)
.NET location: C:\Program Files\dotnet\
The following frameworks were found:
6.0.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
7.0.0-preview.5.22301.12 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.o&arch=arm64&rid=win10-arm64
Expected Behavior
Since .NET SDK (together with the installed runtime for arm64) is installed, I would expect that if a valid web.config configuration is presented - i.e. valid path to the executable that was built with AnyCPU or arm64 configuration, IIS would run the web application using the InProcess hosting model.
web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="bin\Debug\net6.0\WebApplication3exe" arguments="" stdoutLogEnabled="false" hostingModel="InProcess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
</system.webServer>
</location>
</configuration>
Steps To Reproduce
Unfortunately, I believe this to be an SDK/Runtime issue so I'm not able to offer any steps except the following:
- Install IIS on a Win11 ARM64 OS
- Install Visual Studio 2022 Professional 17.3 Preview 2 (ARM64)
- Install the latest .NET hosting bundle (arm64)
- Create a hello world web application for .net6.0 and build for either AnyCPU or arm64
- Create a new website under IIS and assign some port number to localhost
- Attempt to run the app in the browser (serving from IIS)
Exceptions (if any)
No response
.NET Version
7.0.100-preview.5.22307.18
Anything else?
I have the following .net stuff installed (note: .net7.0 apps work OK under IIS, .net6.0 apps don't)
- Visual Studio 2022 Professional 17.3 Preview 2 (ARM64)
- Microsoft .NET 7.0.0 Preview 5.22303.8 Hosting Bundle
- Microsoft .NET Runtime - 7.0.0 preview 5 (arm64)
- Microsoft .NET SDK 7.0.100-preview.5.22307.18 (arm64) from Visual Studio
- Microsoft ASP.NET Core 7.0.0 preview 5.22303.8 - Shared Framework (arm64)
- Microsoft .NET SDK 6.0.400-preview.22301.10 (arm64) from Visual Studio
dotnet --info
output:
C:\Users\andrija>dotnet --info
.NET SDK:
Version: 7.0.100-preview.5.22307.18
Commit: bd8b088037
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-arm64
Base Path: C:\Program Files\dotnet\sdk\7.0.100-preview.5.22307.18\
global.json file:
Not found
Host:
Version: 7.0.0-preview.5.22301.12
Architecture: arm64
Commit: 425fedc0fb
.NET SDKs installed:
6.0.400-preview.22301.10 [C:\Program Files\dotnet\sdk]
7.0.100-preview.5.22307.18 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0-preview.5.22303.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0-preview.5.22301.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0-preview.5.22302.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]