Project creates blank window. #443

Closed
opened 2026-01-29 16:39:47 +00:00 by claunia · 0 comments
Owner

Originally created by @TheGreyRaven on GitHub (Jan 21, 2020).

Hello, I downloaded this just to see how Electron worked: https://github.com/ElectronNET/electron.net-musicplayer-sample
I could compile and run the program without any issues, so I wanted to create my own project.

I am using Visual Studio 2019, I choosed "ASP.NET Core Web Application" and then installed the Electron.API NuGet (Version 7.30.2) and then ran electronize init.

But the Issue I am having is that when running electronize start it creates a Window for me but it is just blank, none of my HTML shows up.

This is how my project looks like:
https://i.imgur.com/lpAo5BW.png

The console outputs the following:
https://pastebin.com/PnHgi3LP

And the developer console on the Electron app outputs the following:

security-warnings.ts:179 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
    Policy set or a policy with "unsafe-eval" enabled. This exposes users of
    this app to unnecessary security risks.

For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
(anonymous) @ security-warnings.ts:179
localhost/:1 Failed to load resource: the server responded with a status of 404 (Not Found)

My Startup.cs
https://pastebin.com/NmKzhnHc

And my Program.cs
https://pastebin.com/XHXVdGF7

My .csproj file looks identical to the musicplayer sample linked above.
To my understanding it seems like the Electron app has trouble finding the .cshtml, but I might be wrong on that subject.
Any ideas why the application just show up a white background?

Originally created by @TheGreyRaven on GitHub (Jan 21, 2020). Hello, I downloaded this just to see how Electron worked: https://github.com/ElectronNET/electron.net-musicplayer-sample I could compile and run the program without any issues, so I wanted to create my own project. I am using Visual Studio 2019, I choosed "ASP.NET Core Web Application" and then installed the Electron.API NuGet (Version 7.30.2) and then ran ``electronize init``. But the Issue I am having is that when running ``electronize start`` it creates a Window for me but it is just blank, none of my HTML shows up. This is how my project looks like: https://i.imgur.com/lpAo5BW.png The console outputs the following: https://pastebin.com/PnHgi3LP And the developer console on the Electron app outputs the following: ``` security-warnings.ts:179 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with "unsafe-eval" enabled. This exposes users of this app to unnecessary security risks. For more information and help, consult https://electronjs.org/docs/tutorial/security. This warning will not show up once the app is packaged. (anonymous) @ security-warnings.ts:179 localhost/:1 Failed to load resource: the server responded with a status of 404 (Not Found) ``` My Startup.cs https://pastebin.com/NmKzhnHc And my Program.cs https://pastebin.com/XHXVdGF7 My .csproj file looks identical to the musicplayer sample linked above. To my understanding it seems like the Electron app has trouble finding the .cshtml, but I might be wrong on that subject. Any ideas why the application just show up a white background?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#443