© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
12 replies
eggsaVEVO

❔ Two Program.cs files in new Blazor Web App template.

After playing around with the preview version of .NET 8 I noticed that in the new Blazor Web App template (which combines webassembly and server side rendering) there are two Program.cs files. I get that for each environment an individual entry point is needed. But its somewhat magic to me how Blazor knows which main function to call. Does the assembly generated by the client project have some special attributes that allows the Blazor app to know that this is the dll for the webassembly rendering or how exactly does this work?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Blazor web app in console
C#CC# / help
3y ago
Blazor web assembly app
C#CC# / help
2y ago
blazor web app using C#
C#CC# / help
12mo ago