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

Issue running .net6.0 (arm64) under IIS on Windows 11 ARM64 - missing version '6.0.o' (arm64) #42699

Closed
1 task done
abrljak opened this issue Jul 12, 2022 · 6 comments
Closed
1 task done
Assignees
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Comments

@abrljak
Copy link

abrljak commented Jul 12, 2022

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:

  1. Install IIS on a Win11 ARM64 OS
  2. Install Visual Studio 2022 Professional 17.3 Preview 2 (ARM64)
  3. Install the latest .NET hosting bundle (arm64)
  4. Create a hello world web application for .net6.0 and build for either AnyCPU or arm64
  5. Create a new website under IIS and assign some port number to localhost
  6. 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]

@adityamandaleeka
Copy link
Member

Support for running ASP.NET Core on ARM64 IIS/IIS Express is new in .NET 7, so it's not unexpected that 6.0 doesn't work. Glad to hear that 7.0 applications are working for you.

I don't know where the "6.0.o" came from though, that is weird 😄

@abrljak
Copy link
Author

abrljak commented Jul 12, 2022

I know it's brand new. That is why I wanted to share this info.
Additionally, I forgot to mention - .net6.0 running on IIS Express seems to be working OK. This looks like an IIS exclusive.
.net7.0 apps work like a charm and overall everything is impressively fast - especially VS that was built for ARM64 as well.

I've updated VS to the latest 17.3 Preview 3 version (released today). Even though new SDKs are included unfortunately it is still looking for "6.0.o" version :(

stdout output:

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

App: C:\_webs\test\WebApplication3\WebApplication3\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.6 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]
  7.0.0-preview.6.22324.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

If it helps, there is absolutely nothing else installed on my system - this is it's sole purpose at this point :)

@adityamandaleeka
Copy link
Member

Can you share the contents of your [appname].runtimeconfig.json file?

@abrljak
Copy link
Author

abrljak commented Jul 13, 2022

sure ... there it is:

{
  "runtimeOptions": {
    "tfm": "net6.0",
    "frameworks": [
      {
        "name": "Microsoft.NETCore.App",
        "version": "6.0.0"
      },
      {
        "name": "Microsoft.AspNetCore.App",
        "version": "6.0.0"
      }
    ],
    "configProperties": {
      "System.GC.Server": true,
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
    }
  }
}

@HaoK HaoK self-assigned this Jul 21, 2022
@HaoK HaoK added this to the .NET 7 Planning milestone Jul 21, 2022
@ghost
Copy link

ghost commented Jul 21, 2022

Thanks for contacting us.

We're moving this issue to the .NET 7 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@HaoK
Copy link
Member

HaoK commented Jul 22, 2022

I tried this on one of our arm64 VMs and I don't see error message you are seeing, it still doesn't work, but I see an error message:

HTTP Error 500.33 - Failed to load ASP.NET Core request handler with an event log saying it can't find the inprocess handler.

Regardless net6.0 on arm64 isn't a scenario we are supporting

@HaoK HaoK closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2022
@HaoK HaoK added the ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. label Jul 22, 2022
@ghost ghost added the Status: Resolved label Jul 22, 2022
@HaoK HaoK added closed: no-repro and removed investigate Status: Resolved ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. labels Jul 22, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2022
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

No branches or pull requests

4 participants