WebWindow icon indicating copy to clipboard operation
WebWindow copied to clipboard

Blazor new template 3.2.0 support

Open SandroRiz opened this issue 4 years ago • 2 comments

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");

SandroRiz avatar Feb 21 '20 11:02 SandroRiz

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

eivarin avatar Feb 21 '20 12:02 eivarin

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

eivarin avatar Feb 23 '20 23:02 eivarin