Migration to .NET 10
This version of PC SDK includes support for both .NET 10 and .NET Framework 4.8.
For a stand-alone application, you can choose the framework that suits your needs.
For a RobotStudio add-in however, you must target .NET 10.0 for compatibility with RobotStudio 2026.1 or later.
Follow the instructions below to migrate an existing project from .NET Framework to .NET 10.
For further information on migrating RobotStudio add-ins, see RobotStudio SDK documentation.
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.
See Create a simple PC SDK application for how to create a new project for .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 the PCSDK assembly to the .NET 10 version which is 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.
3. Review breaking changes
Most of your code should be compatible, but make sure to review it for any breaking changes.
3.1 PC SDK 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.
3.2 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.