# Migrating From .NET Framework to .NET

> Move a Windows Forms app with TX Text Control from the .NET Framework to .NET 8 or higher: project, NuGet package, licensing, class libraries and charts.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for Windows Forms > Installation Guide > Upgrade Guide > Migrating From .NET Framework to .NET
- **1397 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/from-dotnet-framework/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/from-dotnet-framework/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/from-dotnet-framework/llms-full.txt

---

An existing Windows Forms application that uses TX Text Control on the .NET Framework can move to .NET 8 or higher. The TX Text Control code stays the same, but the project changes around it: it references the NuGet package instead of the installed assemblies, and it no longer needs a *licenses.licx* file. The steps below take you through the move, including class libraries and charts.

### What Changes

|  | .NET Framework | .NET 8 or higher |
|---|---|---|
| Project file | Classic project file | SDK-style project file |
| TX Text Control files | References to the assemblies in the *Assembly* folder of the installation | The NuGet package `TXTextControl.TextControl.WinForms.SDK` |
| License | *licenses.licx*, compiled by the license compiler | The license file of the package, embedded into your assembly |
| Toolbox items | Created by the setup | Added by the package, for the current project |
| Charts | `System.Windows.Forms.DataVisualization` of the .NET Framework | A .NET port of the chart control |

### Before You Start

- Install the setup of TX Text Control .NET for Windows Forms 34.0 on your development machine. It provides the NuGet package in the source **Text Control Offline Packages**. See [Installing the Product](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/setup/llms-full.txt).
- If the application uses an earlier TX Text Control version, read [Upgrading from Previous Versions](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/previous-versions/llms-full.txt) and [Breaking Changes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/breaking-changes/llms-full.txt) as well.

### Convert the Project

.NET Windows Forms projects use SDK-style project files, so the project file has to be converted, and its references and packages added again. Text Control's article on this migration uses the .NET Upgrade Assistant extension for Visual Studio:

1. Install the .NET Upgrade Assistant extension and open your project.
2. In **Solution Explorer**, right-click the project and choose **Upgrade**.
3. Select **Upgrade project to a newer .NET version**, then **In-place project upgrade**.
4. Select .NET 8 or higher as the target framework and click **Upgrade selection**.

The tool does not convert the TX Text Control references. They remain in the project, marked with a warning sign, until you replace them in the next step.

Microsoft has since deprecated the .NET Upgrade Assistant and recommends its GitHub Copilot modernization agent instead. See [Upgrade Assistant overview](https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview) on Microsoft Learn. Whichever tool converts the project, the TX Text Control steps below are the same.

### Replace the References With the NuGet Package

1. Choose **Project** > **Manage NuGet Packages...**.
2. Select **Text Control Offline Packages** as the package source.
3. Install `TXTextControl.TextControl.WinForms.SDK`.
4. Remove the old references to the TX Text Control assemblies, if the tool left them in the project.
5. In **Solution Explorer**, delete the file *licenses.licx*.

The project now compiles and runs on .NET. [Installing and Updating Packages](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/nuget/install-update/llms-full.txt) describes the package installation in detail.

- **Why licenses.licx goes.** The license compiler that reads *licenses.licx* does not exist in .NET. Since version 32.0 with Service Pack 2, the package adds the license file *txtextcontrol.winforms.license* to your project, and the build embeds it into your assembly. The file contains encrypted serial number information, so do not share or distribute it. See [Development Licenses](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/licensing/development/llms-full.txt).
- **The designer.** In a .NET project, the toolbox items come from the package, and the Visual Studio designer works as before. See [Visual Studio Toolbox and Designer](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/toolbox/llms-full.txt).

### Class Libraries

If TX Text Control is used in a class library rather than in the application's executable, set the static property [TextControl.EntryAssembly](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/entryassembly-property/llms-full.txt) or [ServerTextControl.EntryAssembly](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/entryassembly-property/llms-full.txt) to the assembly that holds the license. [Class Libraries and User Controls](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/licensing/application/#class-libraries-and-user-controls) shows the code.

### Charts

TX Text Control shows charts with the chart control of `System.Windows.Forms.DataVisualization`. Microsoft did not port this library to .NET. For .NET, Text Control uses a fork of a .NET port, available at [github.com/TextControl/winforms-datavisualization](https://github.com/TextControl/winforms-datavisualization):

1. Clone the repository and build it. The build creates the package *System.Windows.Forms.DataVisualization.1.0.0.nupkg*.
2. Copy the package into *C:\\Program Files (x86)\\Text Control GmbH\\NuGetPackages*, the folder of **Text Control Offline Packages**.
3. Install the package in your project from **Text Control Offline Packages**.

With the package installed, the chart commands of [RibbonInsertTab](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribboninserttab/llms-full.txt) and [RibbonChartLayoutTab](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-windows-forms-ribbon/ribbonchartlayouttab/llms-full.txt) work, and your code adds charts to [TextControl.Charts](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/charts-property/llms-full.txt) as before. The blog article [Using Charts with TX Text Control .NET for Windows 31.0 in .NET 6](https://www.textcontrol.com/blog/2022/11/02/using-charts-with-tx-text-control-net-for-windows-3100-in-net-6/) shows the steps with screenshots.

### Publish the Application

A .NET application is published with **Build** > **Publish Selection** in Visual Studio, and the publish process copies the TX Text Control files. See [Publishing .NET Applications](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/dotnet/llms-full.txt).

### Related Pages

- [.NET and .NET Framework](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/requirements/dotnet/llms-full.txt): the supported versions of both.
- [Upgrading from Previous Versions](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/previous-versions/llms-full.txt): move a project to version 34.0.
- [Development Licenses](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/licensing/development/llms-full.txt): how the license reaches .NET and .NET Framework projects.
- The blog article [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/): the migration with screenshots.

---

## Nearby

- **Previous:** [Upgrading From Previous Versions](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/previous-versions/llms-full.txt)
- **Next:** [Breaking Changes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/installation/upgrading/breaking-changes/llms-full.txt)
