/dotnet-publish --no-restore does nothing #795

Closed
opened 2026-01-29 16:48:49 +00:00 by claunia · 1 comment
Owner

Originally created by @Keith-McKinley on GitHub (May 25, 2022).

Originally assigned to: @GregorBiswanger on GitHub.

  • Version: 13.5.1.0
  • .net: .net6.0
  • Target: win (plan to use linux; arm64 soon)

attempting command
electronize build /target win /dotnet-publish --no-restore
in PS terminal of VS Code
Results in
"Build Electron Application...
Arguments:
target = win
dotnet-publish = --no-restore
Build ASP.NET Core App for win-x64..."
but the cli shows:
Build ASP.NET Core App for win-x64 under Release-Configuration...
dotnet publish -r win-x64 -c "Release" --output "C:...\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained

Projects depend on nuget packages only available in private nuget registry with SSO credentials, so we must restore prior to build/publish, which has been done

Steps to Reproduce:

  1. .net6.0 application
  2. previously running in photino .net
  3. minimal changes to use electron instead
  4. electronize build /target win /dotnet-publish --no-restore
  5. dotnet restore successfully
  6. attempt electronize start as described above
  7. yield "C:\Program Files\dotnet\sdk\6.0.100\NuGet.targets(130,5): error : No such host is known." as an error

Note: the CLI output indicates the "/dotnet-publish --no-restore" is not being passed through to the actual dotnet command

Originally created by @Keith-McKinley on GitHub (May 25, 2022). Originally assigned to: @GregorBiswanger on GitHub. <!-- 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**: 13.5.1.0 <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> * **.net**: .net6.0 <!-- What target are you building for? --> * **Target**: win (plan to use linux; arm64 soon) <!-- Enter your issue details below this comment. --> attempting command `electronize build /target win /dotnet-publish --no-restore` in PS terminal of VS Code Results in "Build Electron Application... Arguments: target = win dotnet-publish = --no-restore Build ASP.NET Core App for win-x64..." but the cli shows: Build ASP.NET Core App for win-x64 under Release-Configuration... dotnet publish -r win-x64 -c "Release" --output "C:\...\obj\desktop\win\bin" /p:PublishReadyToRun=true /p:PublishSingleFile=true --self-contained Projects depend on nuget packages only available in private nuget registry with SSO credentials, so we must restore prior to build/publish, which has been done Steps to Reproduce: 1. .net6.0 application 2. previously running in photino .net 3. minimal changes to use electron instead 4. electronize build /target win /dotnet-publish --no-restore 5. dotnet restore successfully 6. attempt `electronize start` as described above 7. yield "C:\Program Files\dotnet\sdk\6.0.100\NuGet.targets(130,5): error : No such host is known." as an error Note: the CLI output indicates the "/dotnet-publish --no-restore" is not being passed through to the actual dotnet command
claunia added the bug label 2026-01-29 16:48:49 +00:00
Author
Owner

@GregorBiswanger commented on GitHub (Mar 28, 2023):

🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉

With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!

@GregorBiswanger commented on GitHub (Mar 28, 2023): 🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉 With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#795