Cannot build app in non-admin PowerShell session #958

Closed
opened 2026-01-29 16:52:49 +00:00 by claunia · 11 comments
Owner

Originally created by @mu88 on GitHub (Jun 17, 2024).

Problem description

When trying to build an Electron.NET app in a non-admin PowerShell session, it fails when creating a symlink. When doing the same in an admin shell, everything works nicely.

Versions

  • Version: 23.6.2
  • .NET: 8.0.300
  • Node.js: 20.8.1
  • Target: Windows (electronize build /target win)

Steps to Reproduce

  1. Clone this repo: https://github.com/mu88/ElectronWebsiteWrapper
  2. Open non-admin PowerShell
  3. Run dotnet tool restore
  4. Run dotnet electronize build /target win
Logs
Build Electron Application...
Arguments:
      target = win
Build ASP.NET Core App for win-x64...
Executing dotnet publish in this directory: C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win
Build ASP.NET Core App for win-x64 under Release-Configuration...
dotnet publish -r win-x64 -c "Release" --output "C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained
dotnet publish -r win-x64 -c "Release" --output "C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained
Determining projects to restore...
Restored C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\ElectronWebsiteWrapper.csproj (in 1,26 sec).
C:\Program Files\dotnet\sdk\8.0.300\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\ElectronWebsiteWrapper.sln]
ElectronWebsiteWrapper -> C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\bin\Release\net8.0\win-x64\ElectronWebsiteWrapper.dll
ElectronWebsiteWrapper -> C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin\


Start npm install...
npm install --production
npm warn config production Use `--omit=dev` instead.

added 48 packages, and audited 49 packages in 14s

found 0 vulnerabilities
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice To update run: npm install -g npm@10.8.1
npm notice


ElectronHostHook handling started...
Build Electron Desktop Application...
Executing electron magic in this directory: C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\bin\desktop
Create electron-builder configuration file...
node build-helper.js electron.manifest.json


Package Electron App for Platform win...
npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=23.2.0
ÔÇó electron-builder  version=24.13.3 os=10.0.22631
ÔÇó loaded configuration  file=C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin\electron-builder.json
ÔÇó description is missed in the package.json  appPackageFile=C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\package.json
ÔÇó packaging       platform=win32 arch=x64 electron=23.2.0 appOutDir=C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\bin\Desktop\win-unpacked
ÔÇó default Electron icon is used  reason=application icon is not set
ÔÇó downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
ÔÇó downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.306s
Ô¿» cannot execute  cause=exit status 2
                  out=
  7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

  Scanning the drive for archives:
  1 file, 5635384 bytes (5504 KiB)

  Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627.7z
  --
  Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627.7z
  Type = 7z
  Physical Size = 5635384
  Headers Size = 1492
  Method = LZMA2:24m LZMA:20 BCJ2
  Solid = +
  Blocks = 2


  Sub items Errors: 2

  Archives with Errors: 1

  Sub items Errors: 2

                  errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627\darwin\10.12\lib\libcrypto.dylib
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627\darwin\10.12\lib\libssl.dylib

                  command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627'
                  workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign
ÔÇó Above command failed, retrying 3 more times
ÔÇó downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
ÔÇó downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.195s
Ô¿» cannot execute  cause=exit status 2
                  out=
  7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

  Scanning the drive for archives:
  1 file, 5635384 bytes (5504 KiB)

  Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711.7z
  --
  Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711.7z
  Type = 7z
  Physical Size = 5635384
  Headers Size = 1492
  Method = LZMA2:24m LZMA:20 BCJ2
  Solid = +
  Blocks = 2


  Sub items Errors: 2

  Archives with Errors: 1

  Sub items Errors: 2

                  errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711\darwin\10.12\lib\libcrypto.dylib
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711\darwin\10.12\lib\libssl.dylib

                  command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711'
                  workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign
ÔÇó Above command failed, retrying 2 more times
ÔÇó downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
ÔÇó downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.133s
Ô¿» cannot execute  cause=exit status 2
                  out=
  7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

  Scanning the drive for archives:
  1 file, 5635384 bytes (5504 KiB)

  Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263.7z
  --
  Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263.7z
  Type = 7z
  Physical Size = 5635384
  Headers Size = 1492
  Method = LZMA2:24m LZMA:20 BCJ2
  Solid = +
  Blocks = 2


  Sub items Errors: 2

  Archives with Errors: 1

  Sub items Errors: 2

                  errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263\darwin\10.12\lib\libcrypto.dylib
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263\darwin\10.12\lib\libssl.dylib

                  command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263'
                  workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign
ÔÇó Above command failed, retrying 1 more times
ÔÇó downloading     url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1
ÔÇó downloaded      url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.121s
Ô¿» cannot execute  cause=exit status 2
                  out=
  7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26

  Scanning the drive for archives:
  1 file, 5635384 bytes (5504 KiB)

  Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791.7z
  --
  Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791.7z
  Type = 7z
  Physical Size = 5635384
  Headers Size = 1492
  Method = LZMA2:24m LZMA:20 BCJ2
  Solid = +
  Blocks = 2


  Sub items Errors: 2

  Archives with Errors: 1

  Sub items Errors: 2

                  errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791\darwin\10.12\lib\libcrypto.dylib
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791\darwin\10.12\lib\libssl.dylib

                  command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791'
                  workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign
ÔÇó Above command failed, retrying 0 more times


... done
Originally created by @mu88 on GitHub (Jun 17, 2024). ## Problem description When trying to build an Electron.NET app in a non-admin PowerShell session, it fails when creating a symlink. When doing the same in an admin shell, everything works nicely. ## Versions * **Version**: `23.6.2` * **.NET**: `8.0.300` * **Node.js**: `20.8.1` * **Target**: Windows (`electronize build /target win`) ## Steps to Reproduce 1. Clone this repo: https://github.com/mu88/ElectronWebsiteWrapper 2. Open non-admin PowerShell 3. Run `dotnet tool restore` 4. Run `dotnet electronize build /target win` <details> <summary>Logs</summary> ``` Build Electron Application... Arguments: target = win Build ASP.NET Core App for win-x64... Executing dotnet publish in this directory: C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win Build ASP.NET Core App for win-x64 under Release-Configuration... dotnet publish -r win-x64 -c "Release" --output "C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained dotnet publish -r win-x64 -c "Release" --output "C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained Determining projects to restore... Restored C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\ElectronWebsiteWrapper.csproj (in 1,26 sec). C:\Program Files\dotnet\sdk\8.0.300\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds. [C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\ElectronWebsiteWrapper.sln] ElectronWebsiteWrapper -> C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\bin\Release\net8.0\win-x64\ElectronWebsiteWrapper.dll ElectronWebsiteWrapper -> C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin\ Start npm install... npm install --production npm warn config production Use `--omit=dev` instead. added 48 packages, and audited 49 packages in 14s found 0 vulnerabilities npm notice npm notice New minor version of npm available! 10.7.0 -> 10.8.1 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1 npm notice To update run: npm install -g npm@10.8.1 npm notice ElectronHostHook handling started... Build Electron Desktop Application... Executing electron magic in this directory: C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\bin\desktop Create electron-builder configuration file... node build-helper.js electron.manifest.json Package Electron App for Platform win... npx electron-builder --config=./bin/electron-builder.json --win --x64 -c.electronVersion=23.2.0 ÔÇó electron-builder version=24.13.3 os=10.0.22631 ÔÇó loaded configuration file=C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\bin\electron-builder.json ÔÇó description is missed in the package.json appPackageFile=C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\obj\desktop\win\package.json ÔÇó packaging platform=win32 arch=x64 electron=23.2.0 appOutDir=C:\Users\MyUser\Documents\Development\GitHub\ElectronWebsiteWrapper\bin\Desktop\win-unpacked ÔÇó default Electron icon is used reason=application icon is not set ÔÇó downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1 ÔÇó downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.306s Ô¿» cannot execute cause=exit status 2 out= 7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26 Scanning the drive for archives: 1 file, 5635384 bytes (5504 KiB) Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627.7z -- Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627.7z Type = 7z Physical Size = 5635384 Headers Size = 1492 Method = LZMA2:24m LZMA:20 BCJ2 Solid = + Blocks = 2 Sub items Errors: 2 Archives with Errors: 1 Sub items Errors: 2 errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627\darwin\10.12\lib\libcrypto.dylib ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627\darwin\10.12\lib\libssl.dylib command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\024984627' workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign ÔÇó Above command failed, retrying 3 more times ÔÇó downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1 ÔÇó downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.195s Ô¿» cannot execute cause=exit status 2 out= 7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26 Scanning the drive for archives: 1 file, 5635384 bytes (5504 KiB) Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711.7z -- Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711.7z Type = 7z Physical Size = 5635384 Headers Size = 1492 Method = LZMA2:24m LZMA:20 BCJ2 Solid = + Blocks = 2 Sub items Errors: 2 Archives with Errors: 1 Sub items Errors: 2 errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711\darwin\10.12\lib\libcrypto.dylib ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711\darwin\10.12\lib\libssl.dylib command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\590551711' workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign ÔÇó Above command failed, retrying 2 more times ÔÇó downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1 ÔÇó downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.133s Ô¿» cannot execute cause=exit status 2 out= 7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26 Scanning the drive for archives: 1 file, 5635384 bytes (5504 KiB) Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263.7z -- Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263.7z Type = 7z Physical Size = 5635384 Headers Size = 1492 Method = LZMA2:24m LZMA:20 BCJ2 Solid = + Blocks = 2 Sub items Errors: 2 Archives with Errors: 1 Sub items Errors: 2 errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263\darwin\10.12\lib\libcrypto.dylib ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263\darwin\10.12\lib\libssl.dylib command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\214457263' workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign ÔÇó Above command failed, retrying 1 more times ÔÇó downloading url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z size=5.6 MB parts=1 ÔÇó downloaded url=https://github.com/electron-userland/electron-builder-binaries/releases/download/winCodeSign-2.6.0/winCodeSign-2.6.0.7z duration=1.121s Ô¿» cannot execute cause=exit status 2 out= 7-Zip (a) 21.07 (x64) : Copyright (c) 1999-2021 Igor Pavlov : 2021-12-26 Scanning the drive for archives: 1 file, 5635384 bytes (5504 KiB) Extracting archive: C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791.7z -- Path = C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791.7z Type = 7z Physical Size = 5635384 Headers Size = 1492 Method = LZMA2:24m LZMA:20 BCJ2 Solid = + Blocks = 2 Sub items Errors: 2 Archives with Errors: 1 Sub items Errors: 2 errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791\darwin\10.12\lib\libcrypto.dylib ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791\darwin\10.12\lib\libssl.dylib command='C:\Users\MyUser\AppData\Local\npm-cache\_npx\009083ec26dc578f\node_modules\7zip-bin\win\x64\7za.exe' x -bd 'C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791.7z' '-oC:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\928637791' workingDir=C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign ÔÇó Above command failed, retrying 0 more times ... done ``` </details>
claunia added the bug label 2026-01-29 16:52:49 +00:00
Author
Owner

@hswlab commented on GitHub (Jan 9, 2025):

I have currently the same issue. Did you managed to solve this issue meanwhile?

@hswlab commented on GitHub (Jan 9, 2025): I have currently the same issue. Did you managed to solve this issue meanwhile?
Author
Owner

@mu88 commented on GitHub (Jan 10, 2025):

unfortunately not ☹️

@mu88 commented on GitHub (Jan 10, 2025): unfortunately not ☹️
Author
Owner

@biel-correa commented on GitHub (May 12, 2025):

Same issue here, in my case not even in admin powershell is working

@biel-correa commented on GitHub (May 12, 2025): Same issue here, in my case not even in admin powershell is working
Author
Owner

@FlorianRappl commented on GitHub (Oct 31, 2025):

Outdated - use ElectronNET.Core and ElectronNET.Core.AspNet.

See Wiki / What's New.

@FlorianRappl commented on GitHub (Oct 31, 2025): Outdated - use `ElectronNET.Core` and `ElectronNET.Core.AspNet`. See [Wiki / What's New](https://github.com/ElectronNET/Electron.NET/wiki/What's-New).
Author
Owner

@mu88 commented on GitHub (Nov 3, 2025):

That's still an issue, see this branch. Here's the output from a non-admin PS session when running dotnet publish .\FotoManager\FotoManager.csproj -p:PublishProfile=win-x64:

Restore complete (1,8s)
  FotoManagerLogic succeeded (0,5s) → FotoManagerLogic\bin\Release\net9.0\win-x64\FotoManagerLogic.dll
  FotoManager failed with 5 error(s) (83,2s) → FotoManager\publish\Release\net9.0\win-x64\bin\
    EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\108495227\darwin\10.12\lib\libssl.dylib
    EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\511358803\darwin\10.12\lib\libssl.dylib
    EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\717845735\darwin\10.12\lib\libssl.dylib
    EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\831000795\darwin\10.12\lib\libssl.dylib
    D:\Development\PackageCaches\NuGet\electronnet.core\0.1.0-pre.136\build\ElectronNET.LateImport.targets(468,5): error MSB3073: The command "npx electron-builder --config=./electron-builder.json --win --x64 -c.electronVersion=30.4.0  -c.appId "fotomanager" -c.buildVersion "3.0.1" -c.copyright "Copyright © 2025" -c.extraResources "bin/**/*"" exited with code 1.

@FlorianRappl please reopen the issue - thank you

@mu88 commented on GitHub (Nov 3, 2025): That's still an issue, see [this branch](https://github.com/mu88/BlazorFotoManager/tree/feature/new-api). Here's the output from a non-admin PS session when running `dotnet publish .\FotoManager\FotoManager.csproj -p:PublishProfile=win-x64`: ```shell Restore complete (1,8s) FotoManagerLogic succeeded (0,5s) → FotoManagerLogic\bin\Release\net9.0\win-x64\FotoManagerLogic.dll FotoManager failed with 5 error(s) (83,2s) → FotoManager\publish\Release\net9.0\win-x64\bin\ EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\108495227\darwin\10.12\lib\libssl.dylib EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\511358803\darwin\10.12\lib\libssl.dylib EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\717845735\darwin\10.12\lib\libssl.dylib EXEC : error : Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\Mirko\AppData\Local\electron-builder\Cache\winCodeSign\831000795\darwin\10.12\lib\libssl.dylib D:\Development\PackageCaches\NuGet\electronnet.core\0.1.0-pre.136\build\ElectronNET.LateImport.targets(468,5): error MSB3073: The command "npx electron-builder --config=./electron-builder.json --win --x64 -c.electronVersion=30.4.0 -c.appId "fotomanager" -c.buildVersion "3.0.1" -c.copyright "Copyright © 2025" -c.extraResources "bin/**/*"" exited with code 1. ``` @FlorianRappl please reopen the issue - thank you
Author
Owner

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

I was able to build without having a privileged PS session. I am not sure if this is related at all to Electron.NET (besides the issue arises in electron-builder, which is part of Electron).

Here's what Google has to say about it:

electron-builder may require admin privileges on Windows to perform actions like creating symbolic links, installing to "per-machine" locations, or updating files. This is because certain build steps, like those involving the mklink command or system-wide installations, are restricted to administrators by default. You can address this by running the build as an administrator, or by configuring the build to avoid privileged operations where possible.

Why it happens?

  • Creating symbolic links: The mklink command, which electron-builder may use, requires administrator privileges to create symbolic links, especially when building on Windows.
  • "Per-machine" installs: If your application is configured for a "per-machine" installation, it needs administrator rights to install to system-wide locations like Program Files.
  • Auto-updates: Applications that are installed "per-machine" often need administrator privileges to install updates.

How to fix it?

  • Run the build as an administrator: The simplest solution is to run your command prompt or build tool as an administrator. You can right-click the shortcut and select "Run as administrator".
  • Configure "per-user" installation: If you don't need a "per-machine" installation, configure electron-builder to install on a per-user basis instead. This typically avoids the need for admin rights for the installation itself.
  • Disable UAC (User Account Control): You can disable UAC, but this is generally not recommended as it reduces security. This can be done through the "Local Security Policy" or registry editor.
  • Address "Create symbolic links" permission: To grant users the ability to create symbolic links, you can add them to the "Create symbolic links" policy in the Local Security Policy editor (secpol.msc).

I can only suspect that the Node.js installation (i.e., how electron-builder itself is run) might be responsible for the behavior. This could explain why it works for me in a non-elevated session.

@FlorianRappl commented on GitHub (Nov 3, 2025): I was able to build without having a privileged PS session. I am not sure if this is related at all to Electron.NET (besides the issue arises in `electron-builder`, which is part of Electron). Here's what Google has to say about it: > `electron-builder` may require admin privileges on Windows to perform actions like creating symbolic links, installing to "per-machine" locations, or updating files. This is because certain build steps, like those involving the `mklink` command or system-wide installations, are restricted to administrators by default. You can address this by running the build as an administrator, or by configuring the build to avoid privileged operations where possible. > > Why it happens? > > - Creating symbolic links: The `mklink` command, which electron-builder may use, requires administrator privileges to create symbolic links, especially when building on Windows. > - "Per-machine" installs: If your application is configured for a "per-machine" installation, it needs administrator rights to install to system-wide locations like Program Files. > - Auto-updates: Applications that are installed "per-machine" often need administrator privileges to install updates. > > How to fix it? > > - Run the build as an administrator: The simplest solution is to run your command prompt or build tool as an administrator. You can right-click the shortcut and select "Run as administrator". > - Configure "per-user" installation: If you don't need a "per-machine" installation, configure `electron-builder` to install on a per-user basis instead. This typically avoids the need for admin rights for the installation itself. > - Disable UAC (User Account Control): You can disable UAC, but this is generally not recommended as it reduces security. This can be done through the "Local Security Policy" or registry editor. > - Address "Create symbolic links" permission: To grant users the ability to create symbolic links, you can add them to the "Create symbolic links" policy in the Local Security Policy editor (secpol.msc). I can only suspect that the Node.js installation (i.e., how `electron-builder` itself is run) might be responsible for the behavior. This could explain why it works for me in a non-elevated session.
Author
Owner

@mu88 commented on GitHub (Nov 4, 2025):

So you haven't installed Node.js system-wide?

@mu88 commented on GitHub (Nov 4, 2025): So you haven't installed Node.js system-wide?
Author
Owner

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

So you haven't installed Node.js system-wide?

I have a standard NVM-based installation on Windows. This works in the user account as it should. In general you don't want system-wide installations as its all user account-based anyway.

@FlorianRappl commented on GitHub (Nov 4, 2025): > So you haven't installed Node.js system-wide? I have a standard NVM-based installation on Windows. This works in the user account as it should. In general you don't want system-wide installations as its all user account-based anyway.
Author
Owner

@mu88 commented on GitHub (Nov 4, 2025):

If you work with tools like Chocolatey, you have to

@mu88 commented on GitHub (Nov 4, 2025): If you work with tools like Chocolatey, you have to
Author
Owner

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

Sounds rather like an issue with Chocolatey - as mentioned there is not much we can do here as the issue is not in Electron.NET.

@FlorianRappl commented on GitHub (Nov 4, 2025): Sounds rather like an issue with Chocolatey - as mentioned there is not much we can do here as the issue is not in Electron.NET.
Author
Owner

@softworkz commented on GitHub (Nov 14, 2025):

First of all, this appears to be about code signing.`

@FlorianRappl - I suppose you don't have signing configured?
All others - do you have signing enabled?

What's weird about this is that the error is about libcrypto.dylib

                    errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\378639987\darwin\10.12\lib\libcrypto.dylib
    ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\378639987\darwin\10.12\lib\libssl.dylib

This is a macOS specific library and there's no use for it on a Window system...

@softworkz commented on GitHub (Nov 14, 2025): First of all, this appears to be about code signing.` @FlorianRappl - I suppose you don't have signing configured? All others - do you have signing enabled? What's weird about this is that the error is about **libcrypto.dylib** ``` errorOut=ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\378639987\darwin\10.12\lib\libcrypto.dylib ERROR: Cannot create symbolic link : A required privilege is not held by the client. : C:\Users\MyUser\AppData\Local\electron-builder\Cache\winCodeSign\378639987\darwin\10.12\lib\libssl.dylib ``` This is a macOS specific library and there's no use for it on a Window system...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#958