TX Spell .NET for Windows Forms

Migrating From .NET Framework to .NET

Topic

When a Windows Forms application moves from the .NET Framework to .NET 8 or higher, the code that uses TX Spell .NET stays the same: the assemblies have the same names, and the classes the same namespaces. What changes is how TX Spell .NET reaches the project. The references to the assemblies of the installation give way to a NuGet package, which also brings the license and the language data.

What Changes

.NET Framework.NET 8 or higher
AssembliesTXSpell.dll and TXSpell.Windows.Forms.dll, referenced from the Assembly folder of the installationThe package TXTextControl.TXSpell.WinForms.SDK
LicenseAn entry in licenses.licxThe license file txspell.winforms.license, which the package embeds into your assembly
Language dataFound below the Assembly folder while you develop; shipped by youCopied into the output and publish folders by the package
ToolboxThe tab the setup createdThe tab TXSpell 11.0, from the package

Convert the Project

Convert the project itself first, for example with the .NET Upgrade Assistant of Microsoft. It doesn't convert the references to Text Control assemblies, which you replace in the next steps. When the application uses TX Text Control as well, follow Migrating from .NET Framework to .NET in the TX Text Control documentation for its part.

Replace the References With the Package

  1. Remove the references to TXSpell.dll and TXSpell.Windows.Forms.dll from the project.
  2. Choose Project > Manage NuGet Packages... and select Text Control Offline Packages in the Package source list.
  3. If the application uses TX Text Control, install its package first. Then install TXTextControl.TXSpell.WinForms.SDK.
  4. Remove the lines of TX Spell .NET from licenses.licx. If no other lines remain, delete the file.
  5. Rebuild the application and test it.

Code that checks text without a user interface, for example a class library used by a service, takes the package TXTextControl.TXSpell.Core.SDK instead; see Checking Text in Code.

Language Data After the Move

The package copies the US English dictionary, hyphenation list, thesaurus and language recognition data into the output folder. Dictionaries of other languages that your application ships go into the folders Dictionaries, HyphenationLists and SynonymLists of the project, with Copy to Output Directory set, as Installing Dictionaries and Language Data describes. If the application sets the folder properties, such as DictionariesDirectoryPath, it keeps working with the folders you set.

Publish the Application

Publish the application with Publish in Visual Studio; the package copies the files TX Spell .NET needs. With TX Text Control, select a target runtime, such as win-x64, in the publish profile. Without TX Text Control, TX Spell .NET needs no target runtime. Publishing .NET Applications shows the setting.

Next Steps