开发者

How to detect the language version of Visualstudio?

开发者 https://www.devze.com 2022-12-20 14:18 出处:网络
I need to detect the language version of VS and do some action depending on it. How 开发者_Go百科to detect it?

I need to detect the language version of VS and do some action depending on it. How 开发者_Go百科to detect it? Thanks


I think you want to use DTE.LocaleID, that's what other add-ins use to find their resource DLLs.


Here is the example of how to detect default C# language version in Visual Studio 2019:

  1. With a mouse, select the required project and right click then in opened window select Properties.

  2. In opened Properties Window Select vertical Build tab and click on Advanced button.

    How to detect the language version of Visualstudio?

  3. In the opened Advanced Build Settings window it is the row - Language version. In the example: Automatically selected based on framework version.

How to detect the language version of Visualstudio?

  1. If the information which framework version corresponds default C# language version, is required the link (Why can't I select a different C# version? - C# language versioning) can be opened. In this page are the rules on how according to the target framework is determined default C# language version and information on how the default C# language version can be changed.

  2. Which framework version the project uses are in the project settings file. In the example image

    How to detect the language version of Visualstudio?

    framework version is .NET Core 3.0 version, so the default C# language version is 8.00.

0

精彩评论

暂无评论...
验证码 换一张
取 消