dotnet --info output:
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
VS Code version:
C# Extension version:
I have a .net solution, consisting of a web project and one class assembly. I've recently upgraded the solution to .net 2.0, and it seems to have broken vs code. When I open the .sln or the web.csproj file, I get the following output:
Starting OmniSharp server at 9/3/2017, 10:12:27 PM
Target: /Users/matt/dev/MyProject/MyProject.Web
OmniSharp server started wth Mono
Path: /Users/matt/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/run
PID: 2069
OmniSharp: -s /Users/matt/dev/MyProject/MyProject.Web --hostPID 2035 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
锘匡豢{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/matt/dev/MyProject/MyProject.Web' on host 2035."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
Initializing in /Users/matt/dev/MyProject/MyProject.Web
[info]: OmniSharp.DotNet.DotNetProjectSystem
Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
OmniSharp initialized with Mono MSBuild.
MSBUILD_EXE_PATH: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/MSBuild.dll
MSBuildExtensionsPath: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/xbuild
TargetFrameworkRootPath: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/xbuild-frameworks
RoslynTargetsPath: /Users/matt/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn
CscToolPath: /Users/matt/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
No solution files found in '/Users/matt/dev/MyProject/MyProject.Web'
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
Loading project: /Users/matt/dev/MyProject/MyProject.Web/MyProject.Web.csproj
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
If I open the class library .csproj, then it works perfectly. I can dotnet build the solution without issue.
Let me know if you need more information, thanks!
Hi, is there any chance you could provide the project? It'd definitely help us reproduce the issue.
I have the same problem. For some reason Omnisharp takes a very long time to open my solution. I temporarily solved it by extending the timeout. It takes a about 5 minutes to load, but it works. Add this line to your User Settings. "omnisharp.projectLoadTimeout": 600
Thanks chaps, but I sorted it.... I found that the issue wasn't omnisharp at all, it was msbuild - msbuld was hanging when I tried to build the web project - this was in turn upsetting omnisharp.
The cause of the issue turned out to some images I had in the wwwroot folder - 5000 of them, once I added this to the .csproj all was well:
<EnableDefaultItems>False</EnableDefaultItems>
Most helpful comment
Thanks chaps, but I sorted it.... I found that the issue wasn't omnisharp at all, it was msbuild - msbuld was hanging when I tried to build the web project - this was in turn upsetting omnisharp.
The cause of the issue turned out to some images I had in the wwwroot folder - 5000 of them, once I added this to the .csproj all was well: