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:
The respective NuGet package (Net60) is installed:
There are cases in which it may not be possible to build the project due to the following errors:
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:
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:
Thus, the project rebuild will be successful:
2. Move the global.json file from the parent folder to another destination together with the projects that depend on this file.