Steven Giesel 11/19/2025

No more public partial class Program in .NET 10

Read Original

This technical article details a change in .NET 10 where the Program class generated from top-level statements is now always public. This removes the previous requirement for developers to explicitly declare 'public partial class Program' when using WebApplicationFactory<Program> for API testing. The post also mentions the introduction of analyzer ASP0027 related to this change.

No more public partial class Program in .NET 10

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week