[2021.3.1f1 LTS] Error after updating Visual Studio Editor package from 2.0.14 to 2.0.18 by the package manager's recommendation

After having created a brand new project from the 2D URP template, the package manager recommended updating the Visual Studio Editor package to version 2.0.18, saying the version currently installed (2.0.14 - the one that came with the template) wasn’t verified for the editor version I’m using (2021.3.1f1 LTS).

However, updating the package to version 2.0.18 (by the package manager’s recommendation) results in the following errors:

Library\PackageCache\com.unity.ide.visualstudio@2.0.18\Editor\ProjectGeneration\ProjectGeneration.cs(685,58): error CS1061: ‘ScriptCompilerOptions’ does not contain a definition for ‘RoslynAdditionalFilePaths’ and no accessible extension method ‘RoslynAdditionalFilePaths’ accepting a first argument of type ‘ScriptCompilerOptions’ could be found (are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.ide.visualstudio@2.0.18\Editor\ProjectGeneration\ProjectGeneration.cs(686,50): error CS1061: ‘ScriptCompilerOptions’ does not contain a definition for ‘AnalyzerConfigPath’ and no accessible extension method ‘AnalyzerConfigPath’ accepting a first argument of type ‘ScriptCompilerOptions’ could be found (are you missing a using directive or an assembly reference?)

Is there a problem with that specific version (2.0.18) of the package?
Is there a way to fix the problem on my end?
Should I just roll back and use the unverified version of the package (since it gives me no errors)?

This version, as well as .0 and .2 have this bug, likely caused by Unity introducing an API change (an addition) that the IDE plugins made use of but forgot to make it compatible with these three earlier versions that didn’t have that ScriptCompilerOption.

Rider fixed it for their plugin but the VS plugin is still buggy since MS doesn’t care much for boys playing with toys. :roll_eyes:

Just upgrade to 2021.3.3f1 at a minimum or - since you’re upgrading anyway - I would recommend to upgrade to the latest 2021.3 patch version.