Restrict new language features of Visual Basic in Visual Studio 2015

后端 未结 1 345
旧时难觅i
旧时难觅i 2021-01-05 00:49

I\'m currently working on a Visual Basic project with a team of developers, some of which will be able to move to Visual Studio 2015 as soon as it is released, and some who

相关标签:
1条回答
  • 2021-01-05 01:01

    There is no UI feature to set the Language version, but you can unload the project file and add <LangVersion>11</LangVersion> to default Visual Basic to the 2012/2013 language settings. The C# project adds this property under the Project Configuration property groups, so for consistency's sake I've done the same in the sample below.

    The C# property pages do the same thing, except that C# uses a different set of version numbers.

    A full set of all the language versions can be found here.

    2002 (VB 7.0)
    2003 (VB 7.1)
    2005 (VB 8.0)
    2008 (VB 9.0)
    2010 (VB 10.0)
    2012 (VB 11.0)
    2015 (VB 14)
    

    Just tested and this works for me, but I did have to change the casing to:

    enter image description here

    This results in:

    enter image description here

    And a nice build failure:

    enter image description here

    0 讨论(0)
提交回复
热议问题