How to Migrate a .NET Framework Project to SDK-Style
Environment
| Product | UI for WPF |
Description
How to modernize an existing .NET Framework project by converting it to the SDK-style project format.
SDK-style projects simplify project files, improve NuGet package management, support multi-targeting, and make future migration to .NET easier.
Solution
The general recommendation is to migrate to .NET when possible, because it provides better performance and long-term support.
If you must stay on .NET Framework, you can still improve maintainability by converting the project to SDK-style.
Why use SDK-style for .NET Framework projects
- Simplified and cleaner project definition. Instead of explicitly defining each file and reference in the .csproj file, much of this is handled by the SDK.
- Improved NuGet package management through PackageReference.
- Multi-targeting support (for example, net462, net48, net8).
- Full support for the dotnet CLI.
- Easier future migration to .NET.
Convert to SDK-style
-
Open the project
.csprojfile and replace its content with:xml<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>WinExe</OutputType> <TargetFramework>net48</TargetFramework> <UseWPF>true</UseWPF> </PropertyGroup> </Project>If you have build-specific settings, re-apply them in the new
.csprojfile. -
In the project's Properties folder, remove the following assembly attributes from
AssemblyInfo.cs:csharp//[assembly: AssemblyConfiguration("")] //[assembly: AssemblyCompany("Progress")] //[assembly: AssemblyProduct("WpfApp1")] //[assembly: AssemblyVersion("1.0.0.0")] //[assembly: AssemblyFileVersion("1.0.0.0")]If you do not have custom code in
AssemblyInfo.cs, you can delete the file instead.If you also do not have custom settings in
Resources.resxorSettings.settings, you can delete the entire Properties folder. -
Build and run the project.
Move NuGet definitions from packages.config to PackageReference
If you use packages.config, move the Telerik package references into an ItemGroup in the .csproj file.
packages.config (before)
<packages>
<package id="Telerik.Windows.Controls.for.Wpf.Xaml" version="2025.2.521" targetFramework="net46" />
<package id="Telerik.Windows.Controls.Navigation.for.Wpf.Xaml" version="2025.2.521" targetFramework="net46" />
<package id="Telerik.Windows.Controls.GridView.for.Wpf.Xaml" version="2025.2.521" targetFramework="net46" />
</packages>
PackageReference (after)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net48</TargetFramework>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Telerik.Windows.Controls.for.Wpf.Xaml" Version="2025.2.521" />
<PackageReference Include="Telerik.Windows.Controls.Navigation.for.Wpf.Xaml" Version="2025.2.521" />
<PackageReference Include="Telerik.Windows.Controls.GridView.for.Wpf.Xaml" Version="2025.2.521" />
</ItemGroup>
</Project>