sdk
sdk copied to clipboard
When i use "dotnet publish" to generate osx-arm64 binary file on my win-x64 pc. I get an incorrect format file.
Hello, everyone.
I am working on a cross-platform project and distributing binaries to various platforms.
I work on Windows 10 x64, and this is the publish script i'm using:
https://github.com/github0null/eide_tools/blob/master/publish.bat
this is my project:
https://github.com/github0null/eide_tools/blob/master/eide_tools.sln
It will publish osx-arm64 platform dll files by following command:
:: for osx-arm64
echo.
echo --- publish for osx-arm64 ---
echo.
dotnet publish ./eide_tools.sln -o %DIST_DIR%/darwin/unify_builder/arm64^
-c Release --no-self-contained^
-r osx-arm64^
--framework net6.0^
/property:GenerateFullPaths=true^
/consoleloggerparameters:NoSummary
But my users tell me that they can't execute that binary on their mac book m1, using dotnet xxx.dll to execute it, and it prompts an error:
Unhandled exception. System.BadImageFormatException: Could not load file or assembly '/Users/zhangqi/.vscode/extensions/cl.eide-3.20.0/res/tools/darwin/unify_builder/arm64/unify_builder.dll'. An attempt was made to load a program with an incorrect format.
In addition, my user told me that if he compile the repository on his mac book and then overwrite the dll files, the program worked without error.
I want to know what I'm missing and what should I do ?