How do I disable C# 6 Support in Visual Studio 2015?

前端 未结 6 1208
名媛妹妹
名媛妹妹 2020-12-04 08:14

Background

We have a project that we\'re developing in VS 2015 with C#6 enabled that occasionally needs to be opened by developers using VS 2013 without C#6.

6条回答
  •  悲&欢浪女
    2020-12-04 09:09

    add below in .sln.DotSettings should disable it on solution level

    CSharp50
    

    Or if you don't have a .sln.DotSettings file:

    1. If your solution file is called Apple.sln, create a file beside it called Apple.sln.DotSettings.

    2. Give it the following contents:

      
          CSharp50
      
      
    3. Close and reopen the solution, Resharper should only warn you about C#5 things.

    4. Don't forget to remove this when you eventually start using C#6 features! :)

提交回复
热议问题