Migration to .NET 10
This version of the RobotStudio SDK supports RobotStudio 2026 which is built on .NET 10.
Add-ins and Smart Components built for earlier versions of RobotStudio used .NET Framework which is not compatible with .NET 10.
They must therefore be migrated to be compatible with RobotStudio 2026 and later.
Introduction
.NET (formerly .NET Core) is the modern, cross-platform, open-source development platform from Microsoft. It is actively developed with regular releases and improvements in features and performance.
.NET Framework is no longer in active development and only receives security updates.
Binaries built for .NET Framework can not be loaded in a .NET application such as RobotStudio 2026 and later. However, the source code is mostly compatible and can often be migrated with minor changes.
Migration steps
For general guidance on migrating from .NET Framework to .NET, see also .NET upgrade guide.
1. Review third-party dependencies
Before starting the migration, review any third-party libraries that your project depends on. They must be available in a version that is compatible with .NET 10. This includes .NET 5-10 and .NET Standard 2.0-2.1.
2. Convert project and update target framework
.NET uses a new project format which is more concise and easier to manage.
Depending on the complexity of your project, the simplest way may be to create a new project and copy over your source files. RobotStudio SDK comes with Visual Studio project templates for Add-Ins and Smart Components based on .NET 10.
Alternatively, you can use a tool to convert your project.
Follow the instructions here to install and use the tool: https://github.com/dotnet/try-convert.
After conversion, change the target framework to net10.0-windows and make sure to update references to RobotStudio assemblies to the .NET 10 versions which are included in this SDK.
2.1 (Optional) Multi-targeting
If you want to build the same code for both .NET Framework and .NET 10, you can use multi-targeting by changing the
<TargetFramework> element in the project file to <TargetFrameworks>net48;net10.0-windows</TargetFrameworks>.
This of course means that both the code and dependencies must be compatible with both frameworks.
Preprocessor directives such as #if NET48 and #if NET10_0_OR_GREATER can be used to separate code that is specific to one framework.
References in the project file can also be conditioned on the target framework using Condition attributes.
For RobotStudio references, you must use conditional references to an earlier SDK version since they are not cross compatible:
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0-windows'/>
<!-- References to RobotStudio 2026 SDK -->
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net48'/>
<!-- References to RobotStudio 2025 SDK -->
</ItemGroup>
3. Review breaking changes
Most of your code should be compatible, but make sure to review it for any breaking changes.
3.1 RobotStudio APIs
All classes and members that were earlier marked as obsolete have been removed in this version of the SDK.
Additionally, some classes and methods may have been changed or removed. For details, see the release notes.
3.2 Dynamic assembly loading
If your add-in loads assemblies in code, review and implement required changes documented in Add-in isolation and assembly loading.
3.3 Breaking changes in .NET
.NET introduces some breaking changes compared to .NET Framework. For details see: Breaking changes for migration from .NET Framework to .NET Core
Some changes of note:
- Default behavior of Process.Start has changed. You may need to set
UseShellExecuteto true to start non-.NET applications. - BinaryFormatter is deprecated and must be replaced with a more secure serialization method.
- WCF (Windows Communication Foundation) is partially supported using WCF Client NuGet packages. Consider migrating to gRPC or other technologies.
4. Build and test
Build your project and fix any remaining build issues.
Test the add-in or Smart Component in RobotStudio 2026 to make sure it works as expected.
To debug a specific add-in, launch RobotStudio with the command line argument /addin:<path-to-.rsaddin>.
This is already setup in the project templates included in the SDK.
5. Update package and metadata
See also: Distribution Packages
There are a few ways ensure that RobotStudio recognizes that your add-in is compatible, and conversely that older RobotStudio versions will not attempt to load it.
If you create a Distribution Package:
In the package manifest, set the
MinClientVersionelement to26.1.
This indicates that the package is intended for RobotStudio 2026.1 or later, and it will not be loaded in earlier version.
orPut the addin in the
RobotStudio/Add-In-net10.0/folder in the package.
This indicates that the add-in is built for .NET 10 and will only be loaded in RobotStudio 2026 or later.If you use multi-targeting and want to support older RobotStudio versions with the same package, you can include the .NET Framework version of the add-in in the
RobotStudio/Add-In/folder.
For an addin that is not in a distribution package, you should set the MinimumHostVersion element in the .rsaddin file to 26.1.