question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet install does not create signed apphost on macOS Arm64

See original GitHub issue

Here’s my experience with dotnet-serve.

Problems:

  • I had to code sign the apphost.
  • An Arm64 apphost was generated. Should be x64, given that the best asset is net5.0, which can only ever be x64 on macOS Arm64.
rich@MacBook-Air-M1-2020 app % dotnet tool install -g dotnet-serve
You can invoke the tool using the following command: dotnet-serve
Tool 'dotnet-serve' (version '1.8.34') was successfully installed.
rich@MacBook-Air-M1-2020 app % dotnet-serve
zsh: killed     dotnet-serve
rich@MacBook-Air-M1-2020 app % codesign -s - ~/.dotnet/tools/dotnet-serve
rich@MacBook-Air-M1-2020 app % dotnet-serve                            
It was not possible to find any compatible framework version
The framework 'Microsoft.AspNetCore.App', version '5.0.0' (arm64) was not found.
  - The following frameworks were found:
      6.0.0-rc.2.21470.37 at [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=5.0.0&arch=arm64&rid=osx.11.1-arm64

This is the same thing, but happens to work because the tool enable roll-forward. It demonstrates the same problem but slightly differently symptoms. Just like dotnet-serve, dotnet-runtimeinfo should be installed as x64 because it is pre .NET 6 (at least for macOS).

rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % dotnet tool install -g dotnet-runtimeinfo  
You can invoke the tool using the following command: dotnet-runtimeinfo
Tool 'dotnet-runtimeinfo' (version '1.0.5') was successfully installed.
rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % dotnet-runtimeinfo
zsh: killed     dotnet-runtimeinfo
rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % codesign -s - ~/.dotnet/tools/dotnet-runtimeinfo 
rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % dotnet-runtimeinfo
         42
         42              ,d                             ,d
         42              42                             42
 ,adPPYb,42  ,adPPYba, MM42MMM 8b,dPPYba,   ,adPPYba, MM42MMM
a8"    `Y42 a8"     "8a  42    42P'   `"8a a8P_____42   42
8b       42 8b       d8  42    42       42 8PP"""""""   42
"8a,   ,d42 "8a,   ,a8"  42,   42       42 "8b,   ,aa   42,
 `"8bbdP"Y8  `"YbbdP"'   "Y428 42       42  `"Ybbd8"'   "Y428

**.NET information
Version: 6.0.0
FrameworkDescription: .NET 6.0.0-rc.2.21470.23
Libraries version: 6.0.0-rc.2.21470.23
Libraries hash: 826f81a11ad17f415668fe1cb934bdaf00d36ea2

**Environment information
ProcessorCount: 8
OSArchitecture: Arm64
OSDescription: Darwin 21.1.0 Darwin Kernel Version 21.1.0: Sat Sep 11 12:27:45 PDT 2021; root:xnu-8019.40.67.171.4~1/RELEASE_ARM64_T8101
OSVersion: Unix 12.0.0

rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % dotnet tool uninstall -g dotnet-runtimeinfo
Tool 'dotnet-runtimeinfo' (version '1.0.5') was successfully uninstalled.
rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % dotnet tool install -g dotnet-runtimeinfo -a x64
Skip NuGet package signing validation. NuGet signing validation is not available on Linux or macOS https://aka.ms/workloadskippackagevalidation .
You can invoke the tool using the following command: dotnet-runtimeinfo
Tool 'dotnet-runtimeinfo' (version '1.0.5') was successfully installed.
rich@MacBook-Air-M1-2020 dotnet-runtimeinfo % dotnet-runtimeinfo
         42
         42              ,d                             ,d
         42              42                             42
 ,adPPYb,42  ,adPPYba, MM42MMM 8b,dPPYba,   ,adPPYba, MM42MMM
a8"    `Y42 a8"     "8a  42    42P'   `"8a a8P_____42   42
8b       42 8b       d8  42    42       42 8PP"""""""   42
"8a,   ,d42 "8a,   ,a8"  42,   42       42 "8b,   ,aa   42,
 `"8bbdP"Y8  `"YbbdP"'   "Y428 42       42  `"Ybbd8"'   "Y428

**.NET information
Version: 3.1.19
FrameworkDescription: .NET Core 3.1.19
Libraries version: 3.1.19-servicing.21411.1
Libraries hash: bb01933c496758887ca03572c8e2a16a82a1779a

**Environment information
ProcessorCount: 8
OSArchitecture: X64
OSDescription: Darwin 21.1.0 Darwin Kernel Version 21.1.0: Sat Sep 11 12:27:45 PDT 2021; root:xnu-8019.40.67.171.4~1/RELEASE_ARM64_T8101
OSVersion: Unix 21.1.0.0

Dupe of https://github.com/dotnet/sdk/issues/17241.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
vitek-karascommented, Oct 27, 2021

It should be fixed in ,NET 6 GA as well as .NET 7 (this is the 6.0 port - https://github.com/dotnet/sdk/pull/21958). Closing this issue as it has been fixed.

0reactions
vitek-karascommented, Dec 3, 2021

@TwisterTies unfortunately the fixes in .NET 6 arm64 SDK require the tool to be reinstalled. Can you try that? If it still doesn’t work, then could you please create a new issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet ef command showing below error in mac
1 Answer 1 · 1. dotnet-ef in already installed. · I don't see that dotnet ef has a --version option. What is the...
Read more >
Breaking change: Generate apphost for macOS - .NET
Learn about the breaking change in .NET 6 where an executable is generated by default when building on macOS.
Read more >
dotnet command is not found in my Mac m1 terminal
1. removing all files of the current dotnet installation. This is done by deleting the dotnet folder located in /usr/local/share/.
Read more >
Improving .NET host error messages and supportability
Have you ever tried to launch a .NET app and seen an error message telling you that you are missing a runtime, like...
Read more >
Visual Studio for Mac offline installer - Developer Community
I am facing problem in live installation. I have tried at least four times since last night (in at least 18 hours) but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found