What is the difference between a Windows Forms App and Windows Forms App (.NET Framework)

Viewed 23553

When creating a new project in Visual Studio 2019 there are two options to create a Windows Forms App. What is the difference between these options?

enter image description here

5 Answers

Best practice is to choose "Windows Forms App" for new development.

Visual Studio gives developers the option of creating projects based on .NET Framework or .NET Core. Both have been superseded with the release of .NET 5. Developers still have the option to create projects with the .NET Framework, which is why there are two project types.

.NET Framework is older than .NET Core, and runs on Windows only. .NET Core was created to be cross-platform, and originally did not support Windows desktop apps. They had separate releases through .NET Framework 4.8 and .NET Core 3.1.

When .NET Core 3.0 was released, Microsoft began recommending that new applications, regardless of what type, be developed with .NET Core. Microsoft also announced that there would be no further major update to the .NET Framework:

With the .NET Core 3.0 release in September 2019 we think that all new .NET applications should be based on .NET Core. The primary application types from .NET Framework are supported, and where we did not port something over there is a recommended modern replacement. All future investment in .NET will be in .NET Core.

.NET Framework 4.8 will be the last major version of .NET Framework.

Source: .NET Core is the Future of .NET

Further, .NET 5 is the successor of .NET Core and .NET Framework. From now on, there's just .NET:

There will be just one .NET going forward, and you will be able to use it to target Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly and more.

Source: Introducing .NET 5.

Windows Forms App(.NET Framework) is the type which makes desktop apps using .NET Framework. Windows Forms App(.NET) is the type which makes desktop apps also but it uses .NET Core (Latest Version is .NET Core 5.0) The Windows Control Library project template is used to create custom controls to use on Windows Forms like we use button from the tool box Developers use the . NET framework to create Windows desktop applications and server based applications. NET Core is used to create server applications that run on Windows, Linux and Mac.

AS per my consideration, this needs to be more clear.

You can use the Winform (.Net Framework) if you want to run the application that targets the .Net Framework that is automatically installed when you install the windows on the system.

On the other hand, if you want to develop the desktop application with Just Winform app it's mean you are targeting the latest version of .net core that you have to install on the systems where you are gonna run the application, otherwise, the application won't run as expected. and you might be asked to install the latest version of the .net core that is the targeting environment.

You can specify the target framework while developing the application under the properties of the project.

enter image description here

first one. .NET Framework is Windows specific.

second one(not mentioned one) .NET Core is cross-platform.

So you can choose what you want.

Related