# Migrate a Windows Forms Desktop Application to .NET 6

> This article shows how to migrate a .NET Framework Windows Forms desktop application to .NET 5 and better using the .NET Upgrade Assistant. This command line tool helps to migrate the complete project, but minor tweaks are required to port TX Text Control over to .NET 5 and 6.

> **Note:** This article is outdated and may no longer be accurate.

- **Author:** Bjoern Meyer
- **Published:** 2021-12-21
- **Modified:** 2026-07-17
- **Description:** This article shows how to migrate a .NET Framework Windows Forms desktop application to .NET 5 and better using the .NET Upgrade Assistant. This command line tool helps to migrate the complete project, but minor tweaks are required to port TX Text Control over to .NET 5 and 6.
- **3 min read** (420 words)
- **Tags:**
  - .NET 5
  - .NET 6
  - Release
  - Windows Forms
- **Web URL:** https://www.textcontrol.com/blog/2021/12/21/migrate-a-windows-forms-desktop-application-to-dotnet-6/
- **LLMs URL:** https://www.textcontrol.com/blog/2021/12/21/migrate-a-windows-forms-desktop-application-to-dotnet-6/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2021/12/21/migrate-a-windows-forms-desktop-application-to-dotnet-6/llms-full.txt

---

Since .NET 5, Windows Forms (and WPF) desktop applications can be created in Visual Studio based on the new SDK-style project files. Converting existing .NET Framework projects can be a complex task as not only a complete new project file is required, but existing NuGet packages and existing references need to be re-added.

The [.NET Upgrade Assistant](https://docs.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview) is a command-line tool that helps with this task and is designed to assist in upgrading existing .NET Framework projects to .NET 5 and better.

### Installing the .NET Upgrade Assistant

The tool can be easily installed as a .NET CLI tool by running the following command in a *Windows Terminal*:

```
dotnet tool install -g upgrade-assistant
```

### Running the Upgrade Process

Open a *Windows Terminal* and navigate to the folder where your target project is located. Run the *upgrade-assistant* command by passing the project name:

```
upgrade-assistant upgrade .ramework_app_wf.csproj
```

The migration tool guides you through the migration process:

![Migrating the App](https://s1-www.textcontrol.com/assets/dist/blog/2021/12/21/a/assets/step1.webp "Migrating the App")

After each step, the tool provides you an option list to apply or skip the separate, required steps. Simply apply each step for each project in your solution.

In the last step, the project is finalized and should return with *Upgrade has completed. Please review any changes.*:

![Migrating the App](https://s1-www.textcontrol.com/assets/dist/blog/2021/12/21/a/assets/step2.webp "Migrating the App")

### Updating the References

The *.NET Upgrade Assistant* is not able to update the TX Text Control project references. In order to re-add these references, follow the next steps.

- Open the project in Visual Studio and select *Add Project Reference...* from the *Project* main menu.
- Click *Browse* and navigate to the TX Text Control installation folder and select the TX Text Control assemblies you would like to include.
    
    ![Migrating the App](https://s1-www.textcontrol.com/assets/dist/blog/2021/12/21/a/assets/step3.webp "Migrating the App")
- Find the *licenses.licx* and make sure that the *Build Action* is set to *Embedded Resource*.
- Select the project in the *Solution Explorer* and select *Edit Project File* from the *Project* main menu. Find the *PropertyGroup* node and add the *EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization* property, so that the complete group looks like this:
    
    ```
    <PropertyGroup>
      <TargetFramework>net6.0-windows</TargetFramework>
      <OutputType>WinExe</OutputType>
      <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
      <UseWindowsForms>true</UseWindowsForms>
      <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
      <EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization>true</EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization>
    </PropertyGroup>
    ```

The project is now completely converted, can be compiled and started:

![Migrating the App](https://s1-www.textcontrol.com/assets/dist/blog/2021/12/21/a/assets/step4.webp "Migrating the App")

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)

---

## Related Posts

- [Windows Forms and WPF Comeback: .NET 6 and 7. Our Commitment to Windows Applications](https://www.textcontrol.com/blog/2022/08/17/windows-forms-and-wpf-comeback-net-6-and-7-our-commitment-to-windows-applications/llms.txt)
- [Visual Studio 2022 and .NET 5, 6 and 7 (Preview) Support and Strategy](https://www.textcontrol.com/blog/2022/08/11/visual-studio-2022-net-5-6-7-support-and-strategy/llms.txt)
- [Sneak Peek 31.0: Signature Fields](https://www.textcontrol.com/blog/2022/05/27/sneak-peek-310-signature-fields/llms.txt)
- [Sneak Peek 31.0: Full .NET 6 Visual Studio Designer Support](https://www.textcontrol.com/blog/2022/05/27/sneak-peek-31-full-net-6-visual-studio-designer-support/llms.txt)
- [TX Text Control 34.0 SP4 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/05/20/tx-text-control-34-0-sp4-is-now-available/llms.txt)
- [TX Spell .NET 11.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/04/08/tx-spell-net-11-0-sp1-is-now-available/llms.txt)
- [TX Text Control 34.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2026/02/18/tx-text-control-34-0-sp2-is-now-available/llms.txt)
- [TX Text Control 34.0 SP1 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/12/03/tx-text-control-34-0-sp1-is-now-available/llms.txt)
- [Introducing TX Text Control 34.0: Your Next Leap in Document Processing](https://www.textcontrol.com/blog/2025/11/10/introducing-tx-text-control-34-0-your-next-leap-in-document-processing/llms.txt)
- [Sneak Peek: TX Text Control 34.0 Coming November 2025](https://www.textcontrol.com/blog/2025/10/02/sneak-peek-tx-text-control-34-0-coming-november-2025/llms.txt)
- [TX Text Control 33.0 SP3 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/08/14/tx-text-control-33-0-sp3-is-now-available/llms.txt)
- [TX Text Control 33.0 SP2 is Now Available: What's New in the Latest Version](https://www.textcontrol.com/blog/2025/06/18/tx-text-control-33-0-sp2-is-now-available/llms.txt)
- [Service Pack Releases: What's New in TX Text Control 33.0 SP1 and 32.0 SP5](https://www.textcontrol.com/blog/2025/05/07/service-pack-releases-whats-new-in-tx-text-control-33-0-sp1-and-32-0-sp5/llms.txt)
- [The Wait is Over: TX Text Control for Linux is Officially Here](https://www.textcontrol.com/blog/2025/03/12/the-wait-is-over-tx-text-control-for-linux-is-officially-here/llms.txt)
- [Full .NET 9 Support in Text Control .NET Components for ASP.NET Core, Windows Forms, and WPF](https://www.textcontrol.com/blog/2024/11/11/full-net-9-support-in-text-control-net-components-for-asp-net-core-windows-forms-and-wpf/llms.txt)
- [TX Text Control 32.0 Service Pack 4 Released](https://www.textcontrol.com/blog/2024/09/02/tx-text-control-32-0-service-pack-4-released/llms.txt)
- [Service Pack 3: MailMerge Supports SVG Images](https://www.textcontrol.com/blog/2024/04/29/service-pack-3-mailmerge-supports-svg-images/llms.txt)
- [TX Text Control 32.0 Service Pack 3 Released](https://www.textcontrol.com/blog/2024/04/29/tx-text-control-32-0-service-pack-3-released/llms.txt)
- [Upgrading a .NET Framework Windows Forms App to a .NET 8 Windows Forms App with TX Text Control 32.0 SP2](https://www.textcontrol.com/blog/2024/01/16/upgrading-a-net-framework-windows-forms-app-to-a-net-6-windows-forms-app-with-tx-text-control-32-0-sp2/llms.txt)
- [32.0 Service Pack 2: Licensing, Unit Testing, and Azure DevOps](https://www.textcontrol.com/blog/2024/01/05/32-0-service-pack-2-licensing-unit-testing-and-azure-devops/llms.txt)
- [Service Pack 1 for TX Text Control 32.0 Released](https://www.textcontrol.com/blog/2023/11/22/service-pack-1-for-tx-text-control-32-released/llms.txt)
- [Service Pack 4 for TX Text Control 31.0 Released](https://www.textcontrol.com/blog/2023/09/19/service-pack-4-for-tx-text-control-31-released/llms.txt)
- [TX Text Control 32.0 Has Been Released](https://www.textcontrol.com/blog/2023/09/13/tx-text-control-320-has-been-released/llms.txt)
- [Upgrading a .NET Framework Windows Forms App to a .NET 6 Windows Forms App](https://www.textcontrol.com/blog/2023/07/19/upgrading-a-net-framework-windows-forms-app-to-a-net-6-windows-forms-app/llms.txt)
- [Sneak Peek 32.0: Modifying the Normal Stylesheet](https://www.textcontrol.com/blog/2023/07/04/sneak-peek-320-modifying-the-normal-stylesheet/llms.txt)
