Broken build after migration: error MSB4184: The expression "[System.IO.Path]::GetFullPath('')" #991

Closed
opened 2026-01-29 16:54:04 +00:00 by claunia · 2 comments
Owner

Originally created by @mu88 on GitHub (Nov 1, 2025).

  • Version: v0.0.18
  • Target: win-x64

Steps to Reproduce:

  1. Clone the repository https://github.com/mu88/BlazorFotoManager
  2. Switch to the feature branch feature/new-api
  3. Build the app via dotnet build
  4. Publish the app via dotnet publish ./FotoManager/FotoManager.csproj -p:PublishProfile=win-x64

The build fails with D:\Development\PackageCaches\NuGet\electronnet.core\0.0.18\build\ElectronNET.LateImport.targets(431,7): error MSB4184: The expression "[System.IO.Path]::GetFullPath('')" cannot be evaluated. The path is empty. (Parameter 'path')

Image

When using the old API via ElectronNET.API, I can successfully build my app.

Originally created by @mu88 on GitHub (Nov 1, 2025). <!-- Please search existing issues to avoid creating duplicates. --> <!-- Which version of Electron.NET CLI and API are you using? --> <!-- Please always try to use latest version before report. --> * **Version**: `v0.0.18` <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> <!-- What target are you building for? --> * **Target**: `win-x64` <!-- Enter your issue details below this comment. --> <!-- If you want, you can donate to increase issue priority (https://donorbox.org/electron-net) --> Steps to Reproduce: 1. Clone the repository https://github.com/mu88/BlazorFotoManager 2. Switch to the feature branch `feature/new-api` 3. Build the app via `dotnet build` 4. Publish the app via `dotnet publish ./FotoManager/FotoManager.csproj -p:PublishProfile=win-x64` The build fails with `D:\Development\PackageCaches\NuGet\electronnet.core\0.0.18\build\ElectronNET.LateImport.targets(431,7): error MSB4184: The expression "[System.IO.Path]::GetFullPath('')" cannot be evaluated. The path is empty. (Parameter 'path')` <img width="2560" height="360" alt="Image" src="https://github.com/user-attachments/assets/674e664e-bc4d-46cb-a49c-b1d9cd3d7f9b" /> When using the old API via `ElectronNET.API`, I can successfully build my app.
claunia added the bug label 2026-01-29 16:54:04 +00:00
Author
Owner

@FlorianRappl commented on GitHub (Nov 2, 2025):

Fixed in 0.1.0.

@FlorianRappl commented on GitHub (Nov 2, 2025): Fixed in 0.1.0.
Author
Owner

@FlorianRappl commented on GitHub (Nov 19, 2025):

@mu88 while this was monkey patched in 0.1.0 and 0.2.0 for 0.3.0 the error will come back.

See https://github.com/ElectronNET/Electron.NET/pull/942#issuecomment-3552022687 for details on how to resolve that on your side.

@FlorianRappl commented on GitHub (Nov 19, 2025): @mu88 while this was monkey patched in 0.1.0 and 0.2.0 for 0.3.0 the error will come back. See https://github.com/ElectronNET/Electron.NET/pull/942#issuecomment-3552022687 for details on how to resolve that on your side.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#991