New to Telerik UI for WinForms? Download free 30-day trial

How to Handle Build Errors After Using a Telerik WinForms .NET Core Template

Environment

Product Version Product Author
2022.1.222 UI for WinForms for WinForms Desislava Yordanova

Description

Create a Telerik WinForms application from the template:

netsdk1141-error 001

netsdk1141-error 002

The respective NuGet package (Net60) is installed:

netsdk1141-error 003

There are cases in which it may not be possible to build the project due to the following errors:

netsdk1141-error 005

netsdk1141-error 009

More information about it is available here:

Have in mind that these are some of the possible errors that may occur due to the same reason, the global.json. file.

All of these errors are due to a mismatch between the target framework and the specified SDK version. They may occur if there is a global.json file inside of some parent folder which refers a different sdk version, for example:

netsdk1141-error 004

Solution

There are two approaches that can handle this situation:

1. Create a local global.json file and specify the correct sdk version to be used:

netsdk1141-error 006

netsdk1141-error 007

Thus, the project rebuild will be successful:

netsdk1141-error 008

2. Move the global.json file from the parent folder to another destination together with the projects that depend on this file.

See Also

In this article