Set code inspection to earlier .NET version?

Is there a way to set the code inspection to be compatible with a specific earlier version of .NET and C#? In my case, I am using Resharper with Unity, which only supports up to .NET 3.5 syntax, and my projects within the solution are set to 3.5 compatibility, but Resharper keeps suggesting things that won't compile within the Mono 3.5-compatible compiler, like adding covariant/contravariant properties to generics, or using the new C# null propagation operator.

3 comments
Comment actions Permalink

Hello,

Is there a way to set the code inspection to be compatible with a
specific earlier version of .NET and C#?


R# favors the .NET Framework automatically based on the referenced assemblies.

But there're language features which are versioned independently from that.
For example, you can use async/await with .NET 3.5 if your CSC compiler version
can handle them. This is derived from the current VS version automatically.
You can override this manually on a per-project basis in the project property
sheet, see e.g. http://stackoverflow.com/questions/1374829/how-can-resharper-be-made-aware-of-the-framework-version


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


1
Comment actions Permalink

Ah, thanks! However, while I see that section of the property window in Visual Studio 2013, it does not appear in the new Visual Studio 2015 Preview.  I'm using the Resharper 9 EAP in both versions of VS.

0
Comment actions Permalink

Hello,

while I see that section of the property window in Visual Studio 2013,
it does not appear in the new Visual Studio 2015 Preview


Got some older VS14 version installed, so filed an issue for QA to check.
https://youtrack.jetbrains.com/issue/RSRP-427758


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.