This is a migrated thread and some comments may be shown as answers.

How do I enable .NET 5 Support?

5 Answers 684 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Joe asked on 12 Nov 2020, 09:56 PM

I use the UI for WPF (version 2020.3.1020) with a .NET Core 3.1 application on Windows 10.  I get my Telerik assemblies directly from the Telerik NuGet servers.   This has been working well for about a year.

I tried to upgrade my projects to .NET 5 and it does not compile.  Whereever I use Telerik types, I get build errors like this:

(345,17,345,53): error CA1416: 'SelectionRange<double>' is supported on 'Windows' 7.0 and later
 
(1031,23,1031,31): error CA1416: 'CartesianPlotBandAnnotation.Axis.get' is supported on 'Windows' 7.0 and later

 

I've seen on Telerik's own page that they at least support the .NET 5 Preview

Telerik UI for WPF also provides assemblies for .NET 5.0 Preview (since R2 2020) and .NET 5.0 Release Candidate 1 (RC1) (since R3 2020).

So I'm wondering how I can make my project work with the official .NET 5?  Is this supported yet?



5 Answers, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 12 Nov 2020, 11:34 PM
It finally hit me that this is a Code-Analysis warning promoted to an error that I have the ability to disable.  So I am able to use  the UI for WPF in .NET 5 if I disable that warning (CA1416) globally in my projects that use Telerik.   I've now run my app under .NET 5 and all the Telerik stuff appears to work.

It's OK with me -- to disable the warning -- but it does make me miss other instances of this warning that I would like to see.  If there is an alternative approach I can use it would be great to know about it. 
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 17 Nov 2020, 03:56 PM

Hello Joe,

Thank you for the provided information. 

I searched our backlog, however we have not previously received similar reports. That said, disabling the warning seems like a valid approach for the scenario. 

On a side note, you can also take a look at the following github issue: Targeting net5.0-windows still causes 'API X is supported on windows' errors, where a similar behavior was discussed. 

Hope you find this helpful.

Regards,
Vladimir Stoyanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Tony
Top achievements
Rank 1
answered on 01 Dec 2020, 03:12 PM
I'm running into this same issue.  Do you know when an official resolution will be available?
0
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 01 Dec 2020, 05:27 PM
Tony I've actually seen this with other, non-Telerik Assembiles too.  I basically had to disabled the CA1416 warning in all builds of all my projects.

I don't really see that as problematic as we don't advertise our product as working on anything less than WIndows 10 but if you need something before Windows 7 I guess that could be an issue
0
Vladimir Stoyanov
Telerik team
answered on 04 Dec 2020, 09:53 AM

Hello Tony,

The approach of disabling the CA1416 warning is the suggested one in this scenario. 

On a side note, .NET 5 does not support versions of Windows earlier than Windows 7. You can find more information about this here: .NET 5 - Supported OS versions.

Regards,
Vladimir Stoyanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
Joe
Top achievements
Rank 2
Iron
Iron
Veteran
Vladimir Stoyanov
Telerik team
Tony
Top achievements
Rank 1
Share this question
or