mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Why >electronize start does not start the application? #322
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 @win32nipuh on GitHub (May 21, 2019).
Originally assigned to: @GregorBiswanger on GitHub.
I have build the simple app as Gregor showed in youtube.
It was built in VS2019, all is ok.
But when I do
PS E:\MyProjects\CrossPlatform\Federmesser\fmapp5> electronize start
Start Electron Desktop Application...
Microsoft Windows [Version 10.0.17134.765]
(c) 2018 Microsoft Corporation. All rights reserved.
E:\MyProjects\CrossPlatform\Federmesser\fmapp5>dotnet publish -r win-x64 --output "E:\MyProjects\CrossPlatform\Federmesser\fmapp5\obj\Host\bin"
Microsoft (R) Build Engine version 16.1.54-preview+gd004974104 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 594.66 ms for E:\MyProjects\CrossPlatform\Federmesser\fmapp5\FMApp5.csproj.
C:\Program Files\dotnet\sdk\3.0.100-preview4-011223\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(151,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview [E:\MyProjects\CrossPlatform\Federmesser\fmapp5\FMApp5.csproj]
FMApp5 -> E:\MyProjects\CrossPlatform\Federmesser\fmapp5\bin\Debug\netcoreapp3.0\win-x64\FMApp5.dll
FMApp5 -> E:\MyProjects\CrossPlatform\Federmesser\fmapp5\bin\Debug\netcoreapp3.0\win-x64\FMApp5.Views.dll
FMApp5 -> E:\MyProjects\CrossPlatform\Federmesser\fmapp5\obj\Host\bin
E:\MyProjects\CrossPlatform\Federmesser\fmapp5>
Skip npm install, because node_modules directory exists in: E:\MyProjects\CrossPlatform\Federmesser\fmapp5\obj\Host\node_modules
Invoke electron.cmd - in dir: E:\MyProjects\CrossPlatform\Federmesser\fmapp5\obj\Host\node_modules.bin
Microsoft Windows [Version 10.0.17134.765]
(c) 2018 Microsoft Corporation. All rights reserved.
E:\MyProjects\CrossPlatform\Federmesser\fmapp5\obj\Host\node_modules.bin>electron.cmd "....\main.js"
stdout: info: Microsoft.Hosting.Lifetime[0]
Now listening on: http://localhost:5057
stdout: info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: E:\MyProjects\CrossPlatform\Federmesser\fmapp5\obj\Host\bin
and silence...
Then I go to the folder and run FMApp5.exe manually - the same, no app.
What I do wrong?
I have attached my project
FMApp51.zip
@GregorBiswanger commented on GitHub (May 21, 2019):
Currently we have version 5.22.12 -> Support for Electron version 5, .NET Core 2.2, our release 12.
You used .NET Core 3 preview. Please try it again with an .NET Core 2.2 project.
@win32nipuh commented on GitHub (May 22, 2019):
Thank you. I have build the new app (.NET Core 2.2), the same reaction, I run it but app does not appear.
WA1.zip
But VS 2019 show the output
[](1>------ Rebuild All started: Project: WA1, Configuration: Release Any CPU ------
1>C:\Program Files\dotnet\sdk\3.0.100-preview4-011223\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(151,5): message NETSDK1057: You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
)
Then I have run:
PS E:\MyProjects\CrossPlatform\Federmesser\WA1> dotnet --list-sdks
2.1.507 [C:\Program Files\dotnet\sdk]
2.1.700-preview-009618 [C:\Program Files\dotnet\sdk]
2.1.800-preview-009677 [C:\Program Files\dotnet\sdk]
2.2.203 [C:\Program Files\dotnet\sdk]
2.2.300 [C:\Program Files\dotnet\sdk]
3.0.100-preview4-011223 [C:\Program Files\dotnet\sdk]
PS E:\MyProjects\CrossPlatform\Federmesser\WA1> dotnet --version
3.0.100-preview4-011223
May be some versions mix ? what I need to fix?
@GregorBiswanger commented on GitHub (May 22, 2019):
Okay, I found your problem.
You need the UseElectron-WebHost extension in the program.cs:
And remove your fixed url-port assignment.
A tip, first set your application menu and then open the window:
@win32nipuh commented on GitHub (May 22, 2019):
Thank you Gregor! Sorry.
das ist mein Fehler :-)