Rider and .NET 6 target framework

Rider and .NET 6 target framework

contactSAPDT
Observer Observer
2,286 Views
7 Replies
Message 1 of 8

Rider and .NET 6 target framework

contactSAPDT
Observer
Observer

Dear community, I have installed Rider and went through the tutorial. At the step named Set the Target Framework, it suggests to select .NET Framework 4.8. However, Rider suggests net6.0 - would it be safe to use that instead, or is it incompatible?

 

contactSAPDT_0-1662568233101.png

 

Also, using the net6.0 target and the code from the tutorial, the build process yields a few warnings:

 

contactSAPDT_1-1662568321566.png

 

Please advise. -- Many thanks, Anton

0 Likes
2,287 Views
7 Replies
Replies (7)
Message 2 of 8

_gile
Consultant
Consultant

Hi,

The AutoCAD .NET API requires to target the .NET Framework. It does not support Net 6.0.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 8

norman.yuan
Mentor
Mentor

I assume you are talking about using Rider, an .NET IDE, instead of Visual Studio for AutoCAD .NET API/Plugin development. While I have no experience of using Rider (or anything else than VS), it is CERTAIN that you MUST ONLY USE .NET Framework (4.7 or 4.8 for later versions of AutoCAD), and CANNOT use .NET core (.NET 5, 6, or upcoming 7), regardless whatever Rider suggests.

 

BTW, the last version of .NET Framework is 4.8. There nothing called "Framework" since .NET 5.

 

Norman Yuan

Drive CAD With Code

EESignature

Message 4 of 8

contactSAPDT
Observer
Observer

So, this means the target must be set to .NET Framework 4.7.1, and the language version that can be used is C# 7.3? Also, since you said 4.8, does it mean .NET Framework 4.8.1 would also work with the latest version of AutoCAD?

0 Likes
Message 5 of 8

norman.yuan
Mentor
Mentor

I would always using .NET Framewrok 4.8x for latest AutoCAD versions (say, after Acad2019), the C# version is determined by the .NET Framework. Yes, it sucks for not being able to take advantage of fancy features added to C# in later versions, only available with .NET Core (.NET 5, 6...), especially if one also does .NET core programming.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 6 of 8

cesar_mayorine362SG
Contributor
Contributor

all this means that we are sitting on a time bomb?

Framework 4.8 is no longer supported by Microsoft.

0 Likes
Message 7 of 8

_gile
Consultant
Consultant

@cesar_mayorine362SG wrote:

all this means that we are sitting on a time bomb?

Framework 4.8 is no longer supported by Microsoft.


AutoCAD 2025 will support .NET 8.0



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 8 of 8

ActivistInvestor
Mentor
Mentor

Actually, it is possible to use newer versions of C# with older framework versions, with some caveats, and I do that now when necessary.

 

You can have a look at the following discussions about it and also guidance on how to change the language version in a project.

 

https://stackoverflow.com/questions/56651472/does-c-sharp-8-support-the-net-framework/57020770#57020...

 

https://sergiopedri.medium.com/enabling-and-using-c-9-features-on-older-and-unsupported-runtimes-ce3...