SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 215 forks source link

Blazor new template 3.2.0 support #74

Open SandroRiz opened 4 years ago

SandroRiz commented 4 years ago

As we know with the new 3.2.0 preview template of Blazor WebAssembly there is anymore the Startup.cs file and class.

So what we have to use in Program.cs instead
ComponentsDesktop.Run<Startup>("My Blazor App", "wwwroot/index.html");

eivarin commented 4 years ago

My workaround to this. Use the sample program.cs and startup.cs files. Dont forget to change the namespace.

eivarin commented 4 years ago

Just found a problem while working using my workaround... i can't seem to find a way to pass an existing instance of a class to the startup class. I would need to do this so that i could inject that same instance of a class to use in the Components. This would be fixed by updating to the 3.2.0 preview template of BlazorWasm as in this template DI is done the Main class which is in the Program.cs file