Is Kubernetes compatible with ASP NET

When should the .NET Framework be used for Docker containers?

  • 2 minutes to read

While .NET 5 offers significant benefits for new applications and application patterns, the .NET Framework is still a good choice for many existing scenarios.

Migrate existing applications directly to a Windows Server container

You can use Docker containers to simplify deployment even if you're not building microservices. For example, if you want to improve the DevOps workflow with Docker, containers provide more isolated test environments and can solve deployment problems caused by lack of dependencies when you move to a production environment. In such cases, if you are deploying a monolithic application, it makes sense to use Docker and Windows containers for the current .NET Framework applications.

In this scenario, in most cases, you don't need to migrate your existing applications to .NET 5, but can simply use Docker containers that contain the traditional .NET Framework. However, it is recommended that you use .NET 5 if you want to extend an existing application, e.g. B. by writing a new service in ASP.NET Core.

Use third-party .NET libraries or NuGet packages not available for .NET 5

.NET Standard is increasingly used in third-party libraries and enables code sharing in all .NET flavors, including .NET 5. With .NET Standard 2.0 and higher, API interface compatibility between different frameworks has increased significantly. In addition, .NET Core 2.x and later applications can also reference existing .NET Framework libraries directly (see .NET Framework 4.6.1 Support for .NET Standard 2.0 for more information).

In addition, the Windows Compatibility Pack extends the API interface available for .NET Standard 2.0 under Windows. With this package, most of the existing code can be recompiled for .NET Standard 2.x and run on Windows with little or no change.

However, despite these extraordinary advances since .NET Standard 2.0 and .NET Core 2.1 and above, there may still be cases where certain NuGet packages cannot run without Windows and do not support .NET Core and above. If these packages are critical to the application, then you must use the .NET Framework in Windows containers.

Using .NET technologies not available for .NET 5

Some .NET Framework technologies are not available in the current version of .NET (version 5.0 at the time of going to press). Some of these may be available in later versions, but others do not fit the new application patterns for .NET Core and may not be available at all.

The following list includes most of the technologies that are not available in .NET 5:

  • ASP.NET Web Forms: This technology is only available in the .NET Framework. An integration of ASP.NET Web Forms in .NET 5 and higher is currently not planned.

  • WCF services: Even if a WCF client library is available for the use of WCF services with .NET 5, the WCF server implementation is only available in the .NET framework (as of January 2021).

  • Workflow-related services: Windows Workflow Foundation (WF), the Workflow Services (WCF + WF in a single service), and WCF Data Services (formerly ADO.NET Data Services) are only available in the .NET Framework. It is currently not planned to integrate this into .NET 5.

In addition to the technologies listed in the official .NET roadmap, other features may be ported to the new unified .NET platform. You can consider joining the discussions on GitHub to share your thoughts. If you think something is still missing, you can report it in the GitHub repository dotnet / runtime.

Using a platform or API that does not support .NET 5

Some Microsoft and third party platforms do not support .NET 5. For example, some Azure services provide an SDK that cannot yet be used in .NET 5. Most Azure SDKs should be ported to .NET 5 or .NET Standard at some point, but some may not be able to do so for various reasons. You can see the available Azure SDKs on the Azure SDK Latest Releases page.

In the meantime, if one of the platforms or services in Azure does not support .NET 5 with the client API, you can use the appropriate REST API of the Azure service or the Client SDK of the .NET Framework.

Additional resources