WebWindow
WebWindow copied to clipboard
Blazor new template 3.2.0 support
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");
My workaround to this. Use the sample program.cs and startup.cs files. Dont forget to change the namespace.
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