`dotnet --info` output:
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.0\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version:1.18.0
C# Extension version:1.13.0
After opening an existing solution or creating a new one, I get lots of errors such as Predefined type 'System.Void' is not defined or imported.
The reason for that is:
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Enterprise 2017 15.0.26228.4 - "e:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
2: StandAlone 15.0 - "C:\Users\Vahid\.vscode\extensions\ms-vscode.csharp-1.13.0\.omnisharp\msbuild\15.0\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Enterprise 2017 15.0.26228.4 - "e:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin"
It's registering and using an old version of Visual Studio Enterprise 2017 instead of the new .omnisharp\msbuild\15.0\Bin path.
I'm not using and updating Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin path anymore.
Hi, the issue here is that you are running VS 2017 RTM. OmniSharp will try to use VS 2017 if possible, because that will provide a better experience than it's fallback MSBuild. However, VS 2017 RTM in particular has some issues.
We have a fix for this in OmniSharp, but it will be a couple of days that makes its way into C# for VS Code. For now there are few workarounds you can use in recommended order.
"extensions.autoUpdate" to false.
Most helpful comment
I've just pushed a new release that should help address this issue: 1.13.1. We'll be pushing this to marketplace sometime today. However, if you want to try it out, you can follow the instructions here to install it.