🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
.net version
This page was created by Hans.karlsen on 2018-07-11. Last edited by Wikiadmin on 2026-07-29.
  1. .NET version requirements

This page helps developers using MDriven Framework assemblies in Visual Studio choose a compatible .NET target framework and troubleshoot legacy HTTPS/TLS connection failures.

    1. Legacy .NET Framework requirement
    • Since 2018-07-11, the MDriven core assemblies `Eco.Handles` and `Eco.Interfaces` require .NET Framework 4.5 or later.**

The assemblies were updated from .NET 4 to .NET Framework 4.5 because HTTPS services increasingly require Transport Layer Security (TLS), replacing the older Secure Sockets Layer (SSL) protocol. Azure services default to TLS 1.2, and .NET Framework 4.5 is required for this MDriven compatibility baseline.

      1. What this affects

You can encounter compilation errors when a project that references MDriven core assemblies targets a .NET Framework version earlier than 4.5.

For example, if a Visual Studio project targets **.NET Framework 4.0** and references `Eco.Handles` or `Eco.Interfaces`, update the project target framework before rebuilding.

    1. Update a legacy project to .NET Framework 4.5 or later

1. In Visual Studio, right-click the affected project in **Solution Explorer**. 2. Select **Properties**. 3. Open the **Application** tab. 4. Set **Target framework** to **.NET Framework 4.5** or a later compatible version. 5. Save the project settings. 6. Rebuild the solution.

Update every project that directly references the affected MDriven assemblies. A solution can contain projects with different target frameworks, so check the target framework of each project that fails to compile.

> **Gotcha:** Changing the target framework can require you to restore or update referenced NuGet packages. Review build errors after the framework change and confirm that all referenced packages support the selected target framework.

    1. Troubleshoot HTTPS connections in legacy code

If your code compiles but no longer connects to MDriven over HTTPS, configure the process to allow TLS 1.0, TLS 1.1, and TLS 1.2 before the application makes its first HTTPS request:

```csharp System.Net.ServicePointManager.SecurityProtocol =

   SecurityProtocolType.Tls |
   SecurityProtocolType.Tls11 |
   SecurityProtocolType.Tls12;

```

Place this initialization at application startup. For example, put it before code that contacts an HTTPS-hosted MDriven service.

This setting addresses a **connection** problem caused by TLS protocol negotiation. It does not resolve a project that cannot compile because it targets a .NET Framework version earlier than 4.5.

    1. Current .NET projects

For current .NET development, follow the project-specific guidance rather than treating the 2018 .NET Framework 4.5 requirement as the target for new projects. The current .NET Core project guide instructs you to create a .NET console application targeting **.NET 6 or later**, install `MDriven.MVC.Core`, add the expanded `.ecomdl` model, generate C# code, and build the solution.

For example, when you create a new CodeDress-based project, use the workflow in HowTos:How To Create a .NET Core MDriven Project instead of creating a legacy .NET Framework 4.0 project and upgrading it afterward.

The MDriven Framework documentation also describes solution-template projects that run WPF and WinForms targets for both **.NET Framework 4.7.2** and **.NET 8**. See Documentation:MDrivenFramework for that workflow.

    1. Related documentation

- HowTos:How To Create a .NET Core MDriven Project — Create a .NET 6-or-later MDriven project, add the model, generate code, and build. - Documentation:MDrivenFramework — Install and use MDriven Framework in Visual Studio, including current template targets. - Documentation:Dotnet core — .NET Core documentation. - Documentation:Asp.Net Identity package — ASP.NET Identity package documentation. - Documentation:MDriven Framework – a Model driven framework — MDriven Framework concepts and capabilities. - Documentation:How does MDriven work — How MDriven Designer, ViewModels, OCL, and MDrivenServer fit together.