Unable to resotre DotNetCLI Reference #46

Closed
opened 2026-01-29 16:28:34 +00:00 by claunia · 12 comments
Owner

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.

image

I have tried running dotnet restore prior to this. I have .Net Core 2.0 SDK installed and am using Visual Studio 2017.

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. ![image](https://user-images.githubusercontent.com/5922965/32382920-8e9cd31e-c084-11e7-9155-cb48706ec6ed.png) I have tried running dotnet restore prior to this. I have .Net Core 2.0 SDK installed and am using Visual Studio 2017.
claunia added the question label 2026-01-29 16:28:34 +00:00
Author
Owner

@robertmuehsig commented on GitHub (Nov 3, 2017):

Could you a "dotnet restore"?

@robertmuehsig commented on GitHub (Nov 3, 2017): Could you a "dotnet restore"?
Author
Owner

@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.

image

@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. ![image](https://user-images.githubusercontent.com/5922965/32395659-0cb8192c-c0b0-11e7-9ce9-831301b1f6bc.png)
Author
Owner

@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>

@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>
Author
Owner

@newblord commented on GitHub (Nov 3, 2017):

This is what my command outputs:

image

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?

@newblord commented on GitHub (Nov 3, 2017): This is what my command outputs: ![image](https://user-images.githubusercontent.com/5922965/32395971-5ce41b52-c0b1-11e7-9980-4a45860d2525.png) 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?
Author
Owner

@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.

@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.
Author
Owner

@newblord commented on GitHub (Nov 3, 2017):

i cant use any of the dotnet electronize commands

@newblord commented on GitHub (Nov 3, 2017): i cant use any of the dotnet electronize commands
Author
Owner

@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.

@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.
Author
Owner

@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"

@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"
Author
Owner

@GregorBiswanger commented on GitHub (Nov 3, 2017):

Try the default CMD.exe (Command Shell) - I got the same mysterious effects with PowerShell..

@GregorBiswanger commented on GitHub (Nov 3, 2017): Try the default CMD.exe (Command Shell) - I got the same mysterious effects with PowerShell..
Author
Owner

@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.

@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.
Author
Owner

@GregorBiswanger commented on GitHub (Nov 3, 2017):

You are welcome ;)

normal I like PowerShell but the VS integration is terrible...

@GregorBiswanger commented on GitHub (Nov 3, 2017): **You are welcome ;)** normal I like PowerShell but the VS integration is terrible...
Author
Owner

@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.

@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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#46