Open acovaci opened 2 months ago
Okay so while waiting for a reply from people more knowledgable than me, after a bit of googling, I found out I can create a global.json
in the root with:
{
"sdk": {
"version": "6.0.100",
"rollForward": "patch"
}
}
Now the error disappears, but I'm running into a whole new issue:
/Users/######/Documents/Projects/SMAPI/src/SMAPI/Framework/Logging/VerboseLogStringHandler.cs(24,16): error CS0171: Field 'VerboseLogStringHandler.Handler' must be fully assigned before control is returned to the caller [/Users/######/Documents/Projects/SMAPI/src/SMAPI/SMAPI.csproj]
I tried with both 6.0.1xx
and 6.0.4xx
with no luck. Meanwhile, 6.0.0
has no M1-compatible SDK.
Okay so now I am able to debug, but running into this:
/Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/StardewModdingAPI
Failed to load /Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libhostfxr.dylib, error: dlopen(/Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libhostfxr.dylib, 0x0001): tried: '/Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libhostfxr.dylib' (no such file), '/Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
The library libhostfxr.dylib was found, but loading it from /Users/######/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/libhostfxr.dylib failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=2063366
EDIT: Just to clarify, this is now using Visual Studio for Mac, and .NET 6.0
Describe the bug Hi, obligatory I'm not used to C#/.NET dev at all :).
I'm trying to build the project on MacOS. The windows build seems to work fine, but for the Linux build I run into the following issue:
To Reproduce
build/unix/prepare-install-packages.sh
in the$gamePath
variable./build/unix/prepare-install-packages.sh
What I tried so far
I tried changing the
TargetFramework
tocore3.0
, but ran into new errors.Does anyone have a working reproducible setup to build for MacOS? Thanks