Updating Visual Studio from C#4 to C#7

I’m currently working on a coding script for my thesis project. I’m a creative writing graduate student who is creating a game, but I have very little game experience so I’m often having to work through pitfalls. I’m having issues trying to update my VisualStudio software from its current language (C#4) to C#7. I thought perhaps I would find the solution underneath the Preferences tab, but came up empty. I looked on Google and could not comprehend the vocabulary being used to implement the solutions I found on coding websites. My knowledge of VisualStudio is built off of tutorials from Unity3D and workbooks, so I’m not a coder by any stretch of the imagination but I am trying my hardest to learn. Is there a simple solution to this problem that I do not understand because I’m not a coder? Is there any way to change my coding language from C#4 to C#7?

  1. if you’re not a coder i recommend NOT UPDATING FOR A PROJECT ALREADY IN PROGRESS. And I would warn even coders from doing this.
  2. If you’re using Unity, the choice is in its project/publish settings, under Target Framework or so.
  3. The option is partially engine and Visual Studio bound - only the newer releases of engine and Visual Studio support the newest .NET framework versions, afaik (but i might be wrong on this one)
  4. Which is why i would recommend NOT doing it on a project in progress.

May I ask WHY do you think you need to do the update? I’m sure there’s a solution for your actual core problem that doesn’t involve the often complicated process of moving the project to new version of engine and .NET framework.

If you’re using the latest version of Unity (2018.3) and have the scripting runtime set to .NET 4.x Equivalent, you’re already using C# 7. Otherwise, if your scripting runtime is set to (the now deprecated) .NET 3.5 equivalent, you’ll be restricted to an older version of C# because later versions are not compatible with that runtime. However, if you’re not using the latest version of Unity, the only way to upgrade the target version of the language is to upgrade Unity.

How to update unity 2017 Editor compiler to support C#7 for .
I downloaded unity Monetization plugin update and it uses C#7 syntax.
Its not Visual Studio that I need to work but the editor.