mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
When building osx-arm64, the build is performed in the win-x64 folder. #1033
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Tartilla-TAIGO on GitHub (Dec 10, 2025).
OutDir: bin/Debug/net10.0/osx-arm64/
EnsureElectronBuilderJson: /Users/Test/Projects/Test/Test/Properties/
EnsureElectronBuilderJson: /Users/Test/Projects/Test/Test/Properties/electron-builder.json
EnsureElectronBuilderJson: False
_ElectronFiles:
_ElectronFilesToCopy:
Test -> /Users/Test/Projects/Test/Test/bin/Debug/net10.0/osx-arm64/Test.dll
BeforePublishElectronApp PublishDir: publish/Debug/net10.0/win-x64/
BeforePublishElectronApp PublishDir: publish/Debug/net10.0/win-x64/bin/
/usr/local/share/dotnet/dotnet "/usr/local/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/../tools/net10.0/Microsoft.NET.Sdk.StaticWebAssets.Tool.dll" brotli
Test -> /Users/Test/Projects/Test/Test/publish/Debug/net10.0/win-x64/bin/
_ElectronFilesToCopyWithTargetPath:
CopiedFiles: publish/Debug/net10.0/win-x64/bin/.electron/package.json
ElectronPublishFilesToMove: publish/Debug/net10.0/win-x64/bin/.electron/api/app.js;publish/Debug/net10.0/win-x64/bin/.electron/api/autoUpdater.js;publish/Debug/net10.0/win-x64/bin/.electron/api/browserView.js;publish/Debug/net10.0/win-x64/bin/.electron/api/browserWindows.js;publish/Debug/net10.0/win-x64/bin/.electron/api/clipboard.js;publish/Debug/net10.0/win-x64/bin/.electron/api/commandLine.js;publish/Debug/net10.0/win-x64/bin/.electron/api/dialog.js;publish/Debug/net10.0/win-x64/bin/.electron/api/dock.js;publish/Debug/net10.0/win-x64/bin/.electron/api/globalShortcut.js;publish/Debug/net10.0/win-x64/bin/.electron/api/ipc.js;publish/Debug/net10.0/win-x64/bin/.electron/api/menu.js;publish/Debug/net10.0/win-x64/bin/.electron/api/nativeTheme.js;publish/Debug/net10.0/win-x64/bin/.electron/api/notification.js;publish/Debug/net10.0/win-x64/bin/.electron/api/powerMonitor.js;publish/Debug/net10.0/win-x64/bin/.electron/api/process.js;publish/Debug/net10.0/win-x64/bin/.electron/api/screen.js;publish/Debug/net10.0/win-x64/bin/.electron/api/shell.js;publish/Debug/net10.0/win-x64/bin/.electron/api/tray.js;publish/Debug/net10.0/win-x64/bin/.electron/api/webContents.js;publish/Debug/net10.0/win-x64/bin/.electron/ElectronHostHook/connector.js;publish/Debug/net10.0/win-x64/bin/.electron/ElectronHostHook/index.js;publish/Debug/net10.0/win-x64/bin/.electron/eslint.config.js;publish/Debug/net10.0/win-x64/bin/.electron/main.js;publish/Debug/net10.0/win-x64/bin/.electron/package.json;publish/Debug/net10.0/win-x64/bin/.electron/scripts/blazor-preload.js;publish/Debug/net10.0/win-x64/bin/.electron/splashscreen/index.html
My pubxml:
@Tartilla-TAIGO commented on GitHub (Dec 10, 2025):
This may be due to the fact that the main win-x64 framework is specified in csproj, but it works strangely.
@FlorianRappl commented on GitHub (Dec 10, 2025):
What command are you running? I am asking because I also see
Debugappearing in the output paths, while it should beReleaseaccording to your config. So in general it seems like this one is not following the publish definition, hence the question.Can you provide a repo with a reproducible?
@Tartilla-TAIGO commented on GitHub (Dec 10, 2025):
I'll look at everything again tomorrow, maybe I did something wrong. If I don't find the reason for the error in my actions, then tomorrow I will create a test repository.
@AeonSake commented on GitHub (Dec 10, 2025):
I had a similar issue with a project that has other project references; I had to explicitly specify the target framework in the publish command for it to build properly:
dotnet publish -p:PublishProfile=osx-arm64 -r osx-arm64Looks redundant, but I wasn't able to get it to work otherwise.
@softworkz commented on GitHub (Dec 10, 2025):
Hi,
what you are encountering here is in fact a tiny ugliness, essentially the price that had to be paid for some of the major benefits over earlier Electron.NET.
Here's why:
In most .NET scenarios the builds are platform-independent - especially those that you do during development and for debugging. The platform-specifity only plays a role when publishin.
But for Electron.NET, that's different: We have a .net side and an electron side - and the electron side is always platform-specific. When you don't build the electron side alongside, you have nothing: you cannot test, you debug, you cannot recognize any errors.
That means: the target platform (=> runtime identifier) needs to be known before creating any useful output.
And that leaves two options for dealing with it:
RuntimeIdentifiers remain to be a sole matter of publishing (like in most other .net projects)
With the following consequences:
Here we go in the other direction: We define the RID in the project
And that allows to:
Of course, this could be more elegant: You could create multiple solution configurations (like Release-Win, Debug-Win, Release-Linux, Debug-Linux) or even redefine the platforms to switch more easily.
But the bottom line here: There are many different ways and there is no standard pattern for such cases, i.e. everybody may want a different way. If I would have done something like that, it would be incompatible with people's setups and possibly difficult ot understand - so I kept it as a kind of "loose parameter" which makes it up to everyone's self for adapting it to their needs.
@softworkz commented on GitHub (Dec 10, 2025):
That's a bit unfortunate, yea. I'm doing it the same way and quickly forgot about it, so I didn't write about it in the docs either.
Another solution would be doing like this:
Means to add the two property groups, one before and one after. This should preserve and pre-existing values, so that the project-defined value no longer overrides the value form the pubxml file.
@Tartilla-TAIGO commented on GitHub (Dec 11, 2025):
Hi,
I have created a test repository. In the new project, I set up everything using the wiki, but the build continues to build in the Debug folder. In addition, an error occurs when trying to make a build.
CONSOLE: Use build tool: /usr/local/share/dotnet/sdk/10.0.101/MSBuild.dll
10:07:23 Building /Users/semennoskov/Projects/Test/Test/Test.csproj
Creating package.json from template...
OutDir: bin/Debug/net10.0/osx-arm64/
EnsureElectronBuilderJson: /Users/semennoskov/Projects/Test/Test/Properties/
EnsureElectronBuilderJson: /Users/semennoskov/Projects/Test/Test/Properties/electron-builder.json
EnsureElectronBuilderJson: False
_ElectronFiles:
_ElectronFilesToCopy:
Test -> /Users/semennoskov/Projects/Test/Test/bin/Debug/net10.0/osx-arm64/Test.dll
BeforePublishElectronApp PublishDir: publish/Debug/net10.0/osx-arm64/
BeforePublishElectronApp PublishDir: publish/Debug/net10.0/osx-arm64/bin/
/usr/local/share/dotnet/dotnet "/usr/local/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk.StaticWebAssets/targets/../tools/net10.0/Microsoft.NET.Sdk.StaticWebAssets.Tool.dll" brotli
Test -> /Users/semennoskov/Projects/Test/Test/publish/Debug/net10.0/osx-arm64/bin/
_ElectronFilesToCopyWithTargetPath:
CopiedFiles: publish/Debug/net10.0/osx-arm64/bin/.electron/package.json
ElectronPublishFilesToMove: publish/Debug/net10.0/osx-arm64/bin/.electron/api/app.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/autoUpdater.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/browserView.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/browserWindows.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/clipboard.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/commandLine.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/dialog.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/dock.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/globalShortcut.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/ipc.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/menu.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/nativeTheme.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/notification.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/powerMonitor.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/process.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/screen.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/shell.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/tray.js;publish/Debug/net10.0/osx-arm64/bin/.electron/api/webContents.js;publish/Debug/net10.0/osx-arm64/bin/.electron/ElectronHostHook/connector.js;publish/Debug/net10.0/osx-arm64/bin/.electron/ElectronHostHook/index.js;publish/Debug/net10.0/osx-arm64/bin/.electron/eslint.config.js;publish/Debug/net10.0/osx-arm64/bin/.electron/main.js;publish/Debug/net10.0/osx-arm64/bin/.electron/package.json;publish/Debug/net10.0/osx-arm64/bin/.electron/scripts/blazor-preload.js;publish/Debug/net10.0/osx-arm64/bin/.electron/splashscreen/index.html
0>ElectronNET.LateImport.targets(430,7): Error MSB4184 : The expression cannot be calculated "[System.IO.Path]::GetFullPath('')". The value cannot be an empty string. (Parameter 'path')
Important points:
My repository: https://github.com/Tartilla-TAIGO/Test
@FlorianRappl commented on GitHub (Dec 16, 2025):
Hi @softworkz - would #988 help here or should we just maybe have a hint in the docs? How to proceed / close this one?
@softworkz commented on GitHub (Dec 16, 2025):
The PR #988 helps in a a way that it errors out and tells what's wrong.
I'd say, let the user try when the PR is merged, to verify that the error will be emitted and the message is sufficiently helpful.
@softworkz commented on GitHub (Dec 23, 2025):
@Tartilla-TAIGO - have you been able to try with the latest version?
If it still doesn't work, please show the command line you are using to build.
@Tartilla-TAIGO commented on GitHub (Dec 24, 2025):
The issue is closed, thanks
@softworkz commented on GitHub (Dec 24, 2025):
Thanks for the feedback!