mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Unable to resotre DotNetCLI Reference #46
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 @newblord on GitHub (Nov 3, 2017).
Originally assigned to: @robertmuehsig on GitHub.
I grabbed a copy of the Music Player application written by you.
when i run the command dotnet electronize init i get an error.
I have tried running dotnet restore prior to this. I have .Net Core 2.0 SDK installed and am using Visual Studio 2017.
@robertmuehsig commented on GitHub (Nov 3, 2017):
Could you a "dotnet restore"?
@newblord commented on GitHub (Nov 3, 2017):
Ive tried that but that doesnt seem to add the CLI reference.
After i run "dotnet restore", the dependencies folder does not have the Electron.CLI under Nuget.
@robertmuehsig commented on GitHub (Nov 3, 2017):
This is (sadly) by design. CLI extensions can only be added through the .csproj and are not visible like other NuGet packages in VS.
I just cloned the project and it should look like something like this:
PS D:\Code\GitHub\electron.net-musicplayer-sample> dotnet restore
Restoring packages for D:\Code\GitHub\electron.net-musicplayer-sample\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj...
Restoring packages for D:\Code\GitHub\electron.net-musicplayer-sample\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj...
Installing ElectronNET.CLI 0.0.5.
Restore completed in 1.53 sec for D:\Code\GitHub\electron.net-musicplayer-sample\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj.
Installing ElectronNET.API 0.0.5.
Generating MSBuild file D:\Code\GitHub\electron.net-musicplayer-sample\MyElectronMusicPlayer\obj\MyElectronMusicPlayer.csproj.nuget.g.props.
Generating MSBuild file D:\Code\GitHub\electron.net-musicplayer-sample\MyElectronMusicPlayer\obj\MyElectronMusicPlayer.csproj.nuget.g.targets.
Restore completed in 6.43 sec for D:\Code\GitHub\electron.net-musicplayer-sample\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj.
PS D:\Code\GitHub\electron.net-musicplayer-sample>
@newblord commented on GitHub (Nov 3, 2017):
This is what my command outputs:
I do have the dotnetclireference in the .csproj. I assumed it would show up in that list if it actually got installed correctly. For me it is not even installing hte CLI reference.
Do i need to have anything else installed besides .NET Core 2.0 SDK?
@robertmuehsig commented on GitHub (Nov 3, 2017):
And dotnet electronize version doen't work? Maybe the Electron.NET CLI is already installed - it's hard to see from VS if it is there or not.
@newblord commented on GitHub (Nov 3, 2017):
i cant use any of the dotnet electronize commands
@robertmuehsig commented on GitHub (Nov 3, 2017):
Could you check if you have a electronnet.cli folder in the NuGet Cache?
Location: %userprofile%/.nuget/packages
And here: %userprofile%/.nuget/packages/.tools
If yes: Try to remove the electronnet.cli package there and do a new dotnet restore.
@newblord commented on GitHub (Nov 3, 2017):
I just removed it and i got this:
PS C:\Users\hiteshkpatel\Desktop\electron.net-musicplayer-sample-master> dotnet restore --force
Restoring packages for C:\Users\hiteshkpatel\Desktop\electron.net-musicplayer-sample-master\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj...
Restoring packages for C:\Users\hiteshkpatel\Desktop\electron.net-musicplayer-sample-master\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj...
Restore completed in 991.71 ms for C:\Users\hiteshkpatel\Desktop\electron.net-musicplayer-sample-master\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj.
Installing ElectronNET.CLI 0.0.5.
Restore completed in 1.63 sec for C:\Users\hiteshkpatel\Desktop\electron.net-musicplayer-sample-master\MyElectronMusicPlayer\MyElectronMusicPlayer.csproj.
PS C:\Users\hiteshkpatel\Desktop\electron.net-musicplayer-sample-master> dotnet electronize init
No executable found matching command "dotnet-electronize"
@GregorBiswanger commented on GitHub (Nov 3, 2017):
Try the default CMD.exe (Command Shell) - I got the same mysterious effects with PowerShell..
@newblord commented on GitHub (Nov 3, 2017):
oh man that worked. That is so weird that it would not work from Powershell or Nuget Package Manager.
Thanks for the help guys.
@GregorBiswanger commented on GitHub (Nov 3, 2017):
You are welcome ;)
normal I like PowerShell but the VS integration is terrible...
@fiodarsazanavets commented on GitHub (Aug 1, 2018):
I see that this issue is closed, but I had the same problem under different circumstances. I've managed to resolve it, so I am posting this comment in case someone else encounters the same problem.
In my case, I was using CMD.exe from the start and getting the same error message. Initially, I was running the "dotnet electronize start" command from the root of the solution folder. However, when I moved into the folder that contained the .csproj file that contained "ElectronNET.CLI" reference and ran the command again, it worked.