mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
Namespace ElectronNET could not be found #238
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 @TheBrambleShark on GitHub (Dec 9, 2018).
Hello,
I was looking at trying Electron.NET for the purposes of building an x-plat app in a language (C#) that I'm familiar with.
I followed the guide in the readme - Installed the global tooling, created a new MVC app, installed the
ElectronNET.APInuget package, made the appropriate changes toProgram.csandStartup.cs, and ranelectronize init.Here's output from
electronize init:After this, I was ready to start. Since this is just to see it run, I thought I'd use the built-in web page that tells you all about IIS. So to start, I ran
electronize start. Here's the output from that:After a bit of investigation, I found that the
dotnet publishcommand runs adotnet restore, which removes theElectronNET.APInuget package. In other words, the build process removes the API and then complains that it couldn't find it.I've asked around in a C# group that I'm in but we were unable to diagnose this behavior. We did break down a few of the steps and we found that running
dotnet restoredid indeed remove the package, though its output doesn't represent that:Any assistance on this issue would be appreciated. I would rather like to see this work.
Edit: I seem to have made a very strange discovery. Running
electronize startfrom PowerShell makes it past the restore successfully. After installing Node.js (doh!), I was able to get the app to start successfully.So, I pose this question to you: why did this task fail when running under the Package Manager Console but when running under PowerShell it worked just fine?
Also, as an interesting note, despite the documentation saying
dotnet electronize ..., attempting to run that results in an error statingNo executable found matching command "dotnet-electronize". When I installed electronize, it told me to use it as justelectronize, so that's what I've been doing. Is this a result of outdated documentation?Here's a screenshot of the working app:

@robertmuehsig commented on GitHub (Jan 1, 2019):
We updated the readme - don't use "dotnet electronize" instead use just "electronize".
Hope this helps!
@MiffOttah commented on GitHub (Jul 3, 2019):
I had this same problem with the build process removing the Electronize.API package. The solution I found was that electronize didn't like the way Visual Studio installed it. To fix this, I just installed it from the terminal.
And it worked like a charm.
@Succubussix commented on GitHub (Sep 23, 2022):
this still exist until this days. xD this should be in the readme xD It took a lot of try cant figure it out why is it uninstall itself xD