Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NET6_0_OR_GREATER preprocessor directive #22625

Closed
Enderlook opened this issue Nov 16, 2021 · 4 comments
Closed

Add NET6_0_OR_GREATER preprocessor directive #22625

Enderlook opened this issue Nov 16, 2021 · 4 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@Enderlook
Copy link

Is your feature request related to a problem?

I'm trying to define some code that will use NET >= 6 features, however I noticed that there is no NET6_0_OR_GREATER preprocessor directive (such as there is NET5_0_OR_GREATER). There is just NET6_0.

Describe the solution you'd like

The addition of NET6_0_OR_GREATER symbol.

Additional context

image

BTW, this is my first issue on SDK, not sure if this should actually be moved to dotnet/runtime or submit as a visual studio suggestion. Not sure were are actually defined preprocessor directives.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Nov 16, 2021
@gfoidl
Copy link
Member

gfoidl commented Nov 18, 2021

It's already there (at least in VS 17.0.1 with .NET SDK 6.0.100)
grafik

@Enderlook
Copy link
Author

Oh, maybe it's because I use VS 16.11.6? 🤔. 17.0.1 is for VS 2021 (afaik) and I'm still using 2019.
Well, if newer versions of VS has it I guess this can be closed.
Thanks for the response.

@mfkl
Copy link
Contributor

mfkl commented Dec 7, 2021

Can repro. There are no NET6_0_OR_GREATER or NET5_0_OR_GREATER, but NET6_0 is here.

image

VS Conf

Microsoft Visual Studio Community 2022
Version 17.0.2
VisualStudio.17.Release/17.0.2+31919.166
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Community

Visual C++ 2022 00482-90000-00000-AA868
Microsoft Visual C++ 2022

ASP.NET and Web Tools 2019 17.0.793.11735
ASP.NET and Web Tools 2019

Azure App Service Tools v3.0.0 17.0.793.11735
Azure App Service Tools v3.0.0

C# Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 17.0.11 (54f19d2)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 6.0.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools 17.0.1001.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.0.0-beta.21522.2+6d626ff0752a77d339f609b4d361787dc9ca93a5
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

Visual Studio Tools for CMake 1.0
Visual Studio Tools for CMake

VisualStudio.DeviceLog 1.0
Information about my package

VisualStudio.Foo 1.0
Information about my package

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 17.0.0.341 (d17-0@ac52790)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.0.0.182 (remotes/origin/d17-0@ea204898d)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 17.0.17 (9e779b0)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 12.1.0.5 (d17-0/6b0e6b2)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: c633fe9
Java.Interop: xamarin/java.interop/d17-0@febb1367
ProGuard: Guardsquare/proguard@912d149
SQLite: xamarin/sqlite@a575761
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-0@a5194e9

Xamarin.iOS and Xamarin.Mac SDK 15.2.0.17 (738fde344)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

@mqudsi
Copy link

mqudsi commented Jan 27, 2022

@mfkl the project needs to be targeting net6 or greater for NET6_0_OR_GREATER to appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

4 participants