Why does .NET Core 5 work with IIS EXPRESS on ARM64 and .NET Core 6 doesn't?

I've been working with .NET Core with many versions, and actually I'm using a MacBook M1 Pro.

I use Parallels for all my developments and works fine!

But, recently I encountered a curious thing...

If I create a basic API project with .NET Core 5 using Visual Studio 2019 and try to run using IIS Express 10, it runs perfectly.

But, if I create another project, same basic API project with .NET Core 6, now using Visual Studio 2022 (2019 can't runs .NET Core 6), and try to run using IIS Express 10, I get an error like this:

IIS EXPRESS on arm64 is only supported for ASP.NET Core applications targeting .NET 7.0 and newer

Why is this happening? Can someone help me?

I've tried reinstalling Visual Studio SDK versions, and using other VS versions, but without success.

Upvotes: 0

Views: 456

Answers (1)

Lex Li
Lex Li

Reputation: 63123

It's too late to add ARM64 support to .NET 6. So the warning "IIS EXPRESS on arm64 is only supported for ASP.NET Core applications targeting .NET 7.0 and newer" is the best way to prevent any unwanted errors from happening afterwards.

The immediate cause is that

  • VS2022 (like version 17.9.6) can only launch its bundled IIS Express in ARM64 and x86 modes
  • ASP.NET Core module for IIS Express x86 build is missing.

These are quite normal for a product partially migrated to ARM64, and might be fixed in a future update.

BTW, if you use .NET 8 or 9 on Windows ARM64, make sure you apply my patch, which provides a workaround for the installer bug so that you can run ASP.NET Core web apps smoothly on IIS.

You can read more about Windows ARM64 for developers.

Upvotes: 1

Related Questions