-
Prerequisites
- .NET Framework 4.8
- Visual Studio extension for Studio 2021
How to download .NET Framework
The new .Net Framework can be downloaded from Microsoft site. After you install the framework an restart is required.
How check if the framework was installed correctly
After restart using PowerShell you can check if the version was installed correctly.
- In Windows search for PowerShell and open it as Administrator.
-
- Type following command
gci ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP’ -recurse | gp -name Version -EA 0 | where { $_.PSChildName -match ‘^(?!S)\p{L}’} | select PSChildName, Version
Make sure in the displayed list 4.8... version is installed.
-
How to migrate plugin without Visual Studio extension
Plugin manifest changes
- Studio 2021 is with the AppStore and will allow users to install/uninstall plugins directly from Studio, because of this pluginpackage.manifest.xml file needs to have following required data:
- Plugin name. Please make sure the plugin name is added in the manifest file
- Version. Please make sure the version of the plugin does not contain any words in it ( example of correct format: 1.0.0.0) and is highier than 2019 plugin version.
- MinVersion 16.0. Please make sure the minversion is set to "16.0" (If by mistake the version is set to 16, in visual studio will appear an error.
-
Target Framework changes
- Project .Net Framework needs to be changed to 4.8. Right click on the project -> Properties -> Application-> Target framework
-
package.config changes
- Right click on package.config file -> "Migrate to PackageReference".
-
Sdl.Core.PluginFramework and Sdl.Core.PluginFramework.Build Nuget update
- Update the PluginFramework and PluginFramework.Build Nuget Packages to latest version.
.csproj update
Couple of changes needs to be done on the .csproj. Right click on the project -> "Unload project"->"Edit.."
- Search for "PluginDeploymentPath" and change the path to point to 16 folder:
<PluginDeploymentPath>$(AppData)\Sdl\Sdl Trados Studio\16\Plugins</PluginDeploymentPath>
- Make sure all Studio references point to Studio16 folder:
<HintPath>$(ProgramFiles)\SDL\SDL Trados Studio\Studio16\Sdl.Desktop.IntegrationApi.dll</HintPath>
Reload the project and build the solution if the following error appears:
Make sure SDL.Core.PluginFramework Nuget is installed. If is not installed please install it:
-
Why do I need Visual Studio Extensions
- It will install in Visual Studio the templates needed to create Trados Studio 2021 plugins.
- It will install a action which will migrate the existing plugin solution to Studio 2021.
How to download Visual Studio Extension for Studio 2021
Visual Studio extension can be installed in Visual Studio 2017 and 2019.
Visual Studio 2019
Go to Extensions-> Manage Extensions
In Manage Extension window Online Tab search for SDL -> Install "Visual Studio templates for SDL Trados Studio 2021"
Visual Studio 2017
Go to Tools-> Extensions and Updates
In Extensions and Updates window ->Online Tab search for SDL -> Install "Visual Studio templates for SDL Trados Studio 2021".
How to update a old plugin solution to Studio 2021
After the extension was installed open the solution of the plugin which you want to migrate to Studio 2021. In the Solution explorer a new button should be available:
Click on "Update" button. A warning message will appear click on "Reload All"
What the Visual Studio exension changed to your solution
- .NET Framwwork of your project should be 4.8
Right click on project -> Properties
- All the references from .csproj should point to Studio16 folder
Right click on project-> Unload project-> Edit .csproj
PluginDeploymentPath should point to Studio version "16":
<PluginDeploymentPath>$(AppData)\Sdl\Sdl Trados Studio\16\Plugins</PluginDeploymentPath>
All references should point to Studio16 folder:
<HintPath>$(ProgramFiles)\SDL\SDL Trados Studio\Studio16\Sdl.Desktop.IntegrationApi.Extensions.dll</HintPath>
Couple of errors which might appear in Visual Studio
PluginFramework error in editor
If after migration following error appears and all the references are not loaded:
- Right click on packages.config→Migrate packages.config to PackageReference → Ok
- Unload the project and edit the .csproj → Remove following code
Reload the project and build the solution, all the references should be recognized and the plugin will compile without any errors.
.NetFramework is higher than the current targeted framework:
Unload the project and edit the .csproj ->Search for "TargetFrameworkVersion"
Make sure you only have referenced the 4.8 framework version .
If you have another reference like this, or another version which is not 4.8:
Remove that line.