I'm building a multi targeted app with frameworks net7.0-windows;net7.0-macos.
When I build the project, it is building to bin/Debug/net7.0-macos/osx-x64.
I'd like for it to target arm64 since I'm on an M1 mac.
Is this possible?
I'm building a multi targeted app with frameworks net7.0-windows;net7.0-macos.
When I build the project, it is building to bin/Debug/net7.0-macos/osx-x64.
I'd like for it to target arm64 since I'm on an M1 mac.
Is this possible?
Copyright © 2021 Jogjafile Inc.
With .NET Core, you don't need to target a specific architecture, you just deploy for it, using e.g.
This will create the bin/Debug/net7.0/publish folder with the project prepared for arm64.
However, that will most likely result in an error if your project targets
net7.0-windows;net7.0-macos. You need to have a generic target specifier such as onlynet7.0. The operating-system specific targetsnet7.0-windowsandnet7.0-macosare only required if you use libraries that are only available for these frameworks, such as WPF or WinForms. Since you already target macos, I doubt you're using any of these, so why aren't you just using the genericnet7.0target?