Can't start my app #49

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

Originally created by @Petermarcu on GitHub (Nov 4, 2017).

I'm running dotnet electronize start and it stops at:

stdout: Use Electron Port: 8002

I'm using .NET Core 2.0 and Node 8.9. Is that going to work? Any ideas? What other info would be helpful? Should I expect my app to come up when I run start?

Originally created by @Petermarcu on GitHub (Nov 4, 2017). I'm running `dotnet electronize start` and it stops at: `stdout: Use Electron Port: 8002` I'm using .NET Core 2.0 and Node 8.9. Is that going to work? Any ideas? What other info would be helpful? Should I expect my app to come up when I run start?
claunia added the bug label 2026-01-29 16:28:48 +00:00
Author
Owner

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

Does dotnet electronize build work on our machine and can you open the produced application in the /bin/desktop folder?
The start command seems to have some problems unfortunately.

@robertmuehsig commented on GitHub (Nov 4, 2017): Does dotnet electronize build work on our machine and can you open the produced application in the /bin/desktop folder? The start command seems to have some problems unfortunately.
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

Yes build worked and there was an 80MB exe in there but it wouldn't launch. I Also installed electron globally and tried electron . in /bin/desktop folder and it said it couldn't find an app.

@Petermarcu commented on GitHub (Nov 4, 2017): Yes build worked and there was an 80MB exe in there but it wouldn't launch. I Also installed electron globally and tried `electron .` in /bin/desktop folder and it said it couldn't find an app.
Author
Owner

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

Did you use a brand new ASP.NET Core application or the WebApp demo in this repo?

@robertmuehsig commented on GitHub (Nov 4, 2017): Did you use a brand new ASP.NET Core application or the WebApp demo in this repo?
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

I did a new one. I'll try the sample.

@Petermarcu commented on GitHub (Nov 4, 2017): I did a new one. I'll try the sample.
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

Ok, after the fix with the PR I just made for the package version, I was able to dotnet electronize start the sample application.

I did dotnet new web to create the app and then copied in the content from the README.md instructions. I hit the launchSetting.json bug and copied that over. I wonder if there are other differences.

@Petermarcu commented on GitHub (Nov 4, 2017): Ok, after the fix with the PR I just made for the package version, I was able to `dotnet electronize start` the sample application. I did `dotnet new web` to create the app and then copied in the content from the README.md instructions. I hit the launchSetting.json bug and copied that over. I wonder if there are other differences.
Author
Owner

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

Mhh - if you are working with this repository you will need to make sure that under /artifacts are the "dev" NuGet packages (versioned with 1.0.0.0), otherwise it will fall back to the versions on NuGet.org and then it is chaos.

Current approach:
Build the CLI & API, then you should see the NuGet packages under /artifacts. This directroy is configured as a NuGet source and will be consumed from the WebApp. Especially the CLI project is pretty weird, because NuGet is really aggressiv in caching dotnet CLI extensions.
See https://github.com/ElectronNET/Electron.NET/wiki#dev-notes .

@robertmuehsig commented on GitHub (Nov 4, 2017): Mhh - if you are working with this repository you will need to make sure that under /artifacts are the "dev" NuGet packages (versioned with 1.0.0.0), otherwise it will fall back to the versions on NuGet.org and then it is chaos. Current approach: Build the CLI & API, then you should see the NuGet packages under /artifacts. This directroy is configured as a NuGet source and will be consumed from the WebApp. Especially the CLI project is pretty weird, because NuGet is really aggressiv in caching dotnet CLI extensions. See https://github.com/ElectronNET/Electron.NET/wiki#dev-notes .
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

Ok, do you think it would be worth having a sample that doesn't require knowing the dev workflow for the repository?

@Petermarcu commented on GitHub (Nov 4, 2017): Ok, do you think it would be worth having a sample that doesn't require knowing the dev workflow for the repository?
Author
Owner

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

That's the idea behind those repos: https://github.com/ElectronNET/electron.net-api-demos & https://github.com/ElectronNET/electron.net-musicplayer-sample
@GregorBiswanger created those and I think they only use the NuGet versions (but be aware to clean the NuGet cache, otherwise you might work with dev-bits)

@robertmuehsig commented on GitHub (Nov 4, 2017): That's the idea behind those repos: https://github.com/ElectronNET/electron.net-api-demos & https://github.com/ElectronNET/electron.net-musicplayer-sample @GregorBiswanger created those and I think they only use the NuGet versions (but be aware to clean the NuGet cache, otherwise you might work with dev-bits)
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

great. Didn't know about those. After building the repository, 1.0.0 resolved for me.

@Petermarcu commented on GitHub (Nov 4, 2017): great. Didn't know about those. After building the repository, 1.0.0 resolved for me.
Author
Owner

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

Great! We are working on better documentation & more demos. The "WebApp" project here is just our playground.

@robertmuehsig commented on GitHub (Nov 4, 2017): Great! We are working on better documentation & more demos. The "WebApp" project here is just our playground.
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

Actually, I'm reopening this one. I meant to close the PR. I still haven't gotten my normal app working.

@Petermarcu commented on GitHub (Nov 4, 2017): Actually, I'm reopening this one. I meant to close the PR. I still haven't gotten my normal app working.
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

What I have done is confirm that when I create the application in visual studio, it works. So there is a problem with the difference between the Visual Studio template and the dotnet new template.

@Petermarcu commented on GitHub (Nov 4, 2017): What I have done is confirm that when I create the application in visual studio, it works. So there is a problem with the difference between the Visual Studio template and the dotnet new template.
Author
Owner

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

Ah - via dotnet new it doesn't work? Mhh...

@robertmuehsig commented on GitHub (Nov 4, 2017): Ah - via dotnet new it doesn't work? Mhh...
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

Thats right. I'm diffing now.

@Petermarcu commented on GitHub (Nov 4, 2017): Thats right. I'm diffing now.
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

This was missing from the dotnet new template in Startup.cs.

        public Startup(IConfiguration configuration)
        {
            Configuration = configuration;
        }

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc();
        }
@Petermarcu commented on GitHub (Nov 4, 2017): This was missing from the `dotnet new` template in Startup.cs. ``` public Startup(IConfiguration configuration) { Configuration = configuration; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc(); } ```
Author
Owner

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

I thought those lines are more or less required to run a ASP.NET Core app or is this just a bug with the templates?

@robertmuehsig commented on GitHub (Nov 4, 2017): I thought those lines are more or less required to run a ASP.NET Core app or is this just a bug with the templates?
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

They are required to run an MVC app. dotnet new web is supposed to just be a blank app. Does Electron.NET assume mvc?

@Petermarcu commented on GitHub (Nov 4, 2017): They are required to run an MVC app. `dotnet new web` is supposed to just be a blank app. Does Electron.NET assume mvc?
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

I'm guessing it would have worked fine if I did dotnet new mvc.

@Petermarcu commented on GitHub (Nov 4, 2017): I'm guessing it would have worked fine if I did `dotnet new mvc`.
Author
Owner

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

Ah - currently yes, because we use it to serve the HTML pages that the Electron part is showing.

@robertmuehsig commented on GitHub (Nov 4, 2017): Ah - currently yes, because we use it to serve the HTML pages that the Electron part is showing.
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

Looking at the getting started "configure method", my question is answered.

app.UseMvc(routes =>
    {
        routes.MapRoute(
            name: "default",
            template: "{controller=Home}/{action=Index}/{id?}");
    });

I'll close this issue unless you want to add a note to the readme to mention that mvc is required and to make sure those lines are in the Startup.cs.

@Petermarcu commented on GitHub (Nov 4, 2017): Looking at the getting started "configure method", my question is answered. ``` app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); ``` I'll close this issue unless you want to add a note to the readme to mention that mvc is required and to make sure those lines are in the Startup.cs.
Author
Owner

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

I will add this that we require MVC - good input! Many thanks!

@robertmuehsig commented on GitHub (Nov 4, 2017): I will add this that we require MVC - good input! Many thanks!
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

No problem.

@Petermarcu commented on GitHub (Nov 4, 2017): No problem.
Author
Owner

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

I'm closing this one - ok?

@robertmuehsig commented on GitHub (Nov 4, 2017): I'm closing this one - ok?
Author
Owner

@Petermarcu commented on GitHub (Nov 4, 2017):

👍

@Petermarcu commented on GitHub (Nov 4, 2017): 👍
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#49