_From @solrevdev on June 18, 2018 11:16_
We have written the needed data into your clipboard because it was too large to send. Please paste.
Issue Type: Bug
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/solrevdev/Projects/fridgeswag/web/web.csproj'.
/Users/solrevdev/Projects/fridgeswag/web/web.csproj(1,1)
Microsoft.Build.Exceptions.InvalidProjectFileException: The imported project "/usr/local/Cellar/mono/5.12.0.226/lib/mono/xbuild/15.0/Microsoft.Common.props" was not found. Also, tried to find "15.0/Microsoft.Common.props" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" . These search paths are defined in "/Users/solrevdev/.vscode-insiders/extensions/ms-vscode.csharp-1.15.2/.omnisharp/1.30.1/omnisharp/OmniSharp.exe.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. /usr/local/share/dotnet/sdk/2.1.300/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (System.String errorSubCategoryResourceName, Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00042] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject (Microsoft.Build.Shared.IElementLocation elementLocation, System.String resourceName, System.Object[] args) [0x00000] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ThrowForImportedProjectWithSearchPathsNotFound (Microsoft.Build.Evaluation.ProjectImportPathMatch searchPathMatch, Microsoft.Build.Construction.ProjectImportElement importElement) [0x000a2] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].ExpandAndLoadImports (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x001be] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0000d] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x00209] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003a] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x00209] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].EvaluateImportElement (System.String directoryOfImportingFile, Microsoft.Build.Construction.ProjectImportElement importElement) [0x0003a] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].PerformDepthFirstPass (Microsoft.Build.Construction.ProjectRootElement currentProjectOrImport) [0x000e6] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Framework.BuildEventContext buildEventContext) [0x000f8] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Evaluator`4[P,I,M,D].Evaluate (Microsoft.Build.Evaluation.IEvaluatorData`4[P,I,M,D] data, Microsoft.Build.Construction.ProjectRootElement root, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings, System.Int32 maxNodeCount, Microsoft.Build.Collections.PropertyDictionary`1[T] environmentProperties, Microsoft.Build.BackEnd.Logging.ILoggingService loggingService, Microsoft.Build.Evaluation.IItemFactory`2[S,T] itemFactory, Microsoft.Build.Evaluation.IToolsetProvider toolsetProvider, Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache, Microsoft.Build.Framework.BuildEventContext buildEventContext, Microsoft.Build.Execution.ProjectInstance projectInstanceIfAnyForDebuggerOnly, Microsoft.Build.BackEnd.SdkResolution.ISdkResolverService sdkResolverService, System.Int32 submissionId) [0x00018] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project.Reevaluate (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00046] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00034] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary (Microsoft.Build.BackEnd.Logging.ILoggingService loggingServiceForEvaluation) [0x00000] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary () [0x00007] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project.Initialize (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00126] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, System.String subToolsetVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x0009c] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection, Microsoft.Build.Evaluation.ProjectLoadSettings loadSettings) [0x00000] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.Project..ctor (System.String projectFile, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion, Microsoft.Build.Evaluation.ProjectCollection projectCollection) [0x00000] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.String toolsVersion) [0x000f5] in <61115f75067146fab35b10183e6ee379>:0
at Microsoft.Build.Evaluation.ProjectCollection.LoadProject (System.String fileName, System.String toolsVersion) [0x00000] in <61115f75067146fab35b10183e6ee379>:0
at OmniSharp.MSBuild.ProjectLoader.EvaluateProjectFileCore (System.String filePath) [0x0003e] in <64f2a38974d54ecaaa93e3697628b738>:0
at OmniSharp.MSBuild.ProjectLoader.BuildProject (System.String filePath) [0x0000d] in <64f2a38974d54ecaaa93e3697628b738>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Load (System.String filePath, OmniSharp.MSBuild.ProjectLoader loader) [0x00014] in <64f2a38974d54ecaaa93e3697628b738>:0
at OmniSharp.MSBuild.ProjectManager+<>c__DisplayClass23_0.<LoadProject>b__0 () [0x00000] in <64f2a38974d54ecaaa93e3697628b738>:0
at (wrapper delegate-invoke) System.Func`1[System.ValueTuple`2[OmniSharp.MSBuild.ProjectFile.ProjectFileInfo,System.Collections.Immutable.ImmutableArray`1[OmniSharp.MSBuild.Logging.MSBuildDiagnostic]]].invoke_TResult()
at OmniSharp.MSBuild.ProjectManager.LoadOrReloadProject (System.String projectFilePath, System.Func`1[TResult] loadFunc) [0x0001b] in <64f2a38974d54ecaaa93e3697628b738>:0
VS Code version: Code - Insiders 1.25.0-insider (c51cf862a9604dffe2e3e8792a4b0a45213869a3, 2018-06-18T08:41:23.700Z)
OS version: Darwin x64 16.7.0
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz (4 x 2600)|
|GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled|
|Load (avg)|2, 2, 3|
|Memory (System)|16.00GB (3.96GB free)|
|Process Argv|/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron -psn_0_10459641|
|Screen Reader|no|
|VM|0%|
Extensions (27)
Extension|Author (truncated)|Version
---|---|---
vscode-wakatime|Wak|1.2.2
html-css-class-completion|Zig|1.17.1
vscode-exports-autocomplete|cap|0.5.4
npm-intellisense|chr|1.3.0
vscode-markdownlint|Dav|0.18.0
vscode-eslint|dba|1.4.12
docs-markdown|doc|0.0.3
gitlens|eam|8.3.5
vscode-html-css|ecm|0.2.0
tslint|eg2|1.0.32
vsc-material-theme|Equ|2.1.0
prettier-vscode|esb|1.5.0
rest-client|hum|0.18.4
nuget-reverse-package-search|jes|0.1.68
vscode-nuget-package-manager|jmr|1.1.6
DocFX|ms-|0.1.3
python|ms-|2018.5.0
csharp|ms-|1.15.2
vsliveshare|ms-|0.3.295
debugger-for-chrome|msj|4.6.0
vscode-docker|Pet|0.0.27
polacode|pnp|0.2.2
quicktype|qui|10.0.24
LiveServer|rit|5.0.0
vscode-icons|rob|7.23.0
msbuild-project-tools|tin|0.2.39
JavaScriptSnippets|xab|1.6.0
_Copied from original issue: Microsoft/vscode#52188_
_From @vscodebot[bot] on June 18, 2018 11:16_
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
Btw homebrew updated my mono this morning as it’s been working absolutely fantastically. (Mac OS X Sierra)
Lovely editor. Hope the feedback helps.
This is now working for me, details at the bottom but here is the story:
Homebrew updated my mono installation on Mac OSX Sierra breaking OmniSharp.MSBuild complaining about parsing my web.csproj file.
It updated it to this version.
mono --version
mono --version 1 ↵
Mono JIT compiler version 5.12.0.226 (tarball Thu Jun 14 13:14:41 BST 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: amd64
Disabled: none
Misc: softdebug
Interpreter: yes
LLVM: supported, not enabled.
GC: sgen (concurrent by default)
My project was a .NET CORE 2.1.300 website.
dotnet --info
dotnet --info 1 ↵
.NET Core SDK (reflecting any global.json):
Version: 2.1.300
Commit: adab45bf0c
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.1.300/
Host (useful for support):
Version: 2.1.0
Commit: caa7b7e2ba
.NET Core SDKs installed:
1.0.1 [/usr/local/share/dotnet/sdk]
1.0.4 [/usr/local/share/dotnet/sdk]
1.1.5 [/usr/local/share/dotnet/sdk]
1.1.7 [/usr/local/share/dotnet/sdk]
2.0.0 [/usr/local/share/dotnet/sdk]
2.1.3 [/usr/local/share/dotnet/sdk]
2.1.4 [/usr/local/share/dotnet/sdk]
2.1.300 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
The fix was to go to the mono page and look for the version for visual studio for mac that was a lower verison so i installed this:
So TL;DR
The version of mono in homebrew while most recent doesnt contain MSBUILD or the Microsoft.Common.props file so in order to carry on working I downloaded the version of mono linked above from the mono site and now its giving me intellisense and the OmniSharp.MsBuild server is parsing my project again.
All good.
Perhaps it would be good for homebrew to bundle MSBUILD or perhaps the mono for visual studio for mac version be an option or something as i would rather to manage mono via my package manager but who and how and what?
Hope this helps someone.
If the problem is Homebrew Mono, should an issue be filed with Homebrew https://github.com/Homebrew/homebrew-core/issues/new/choose ? Would it be helpful if I filed such an issue?
@mcclure Absolutely. Please do!
@solrevdev I'm glad you got this figured out--I'm going to close the issue, but feel free to add further comments or reopen.
@rchande yes please do and thanks very much.
Some feedback if it’s wanted - I now pretty much live in the insiders build all the time and it’s such a great editor / ide.
Awesome work everyone.
FWIW, you can install the Mono MDK via Homebrew which does include MSBuild: brew cask install mono-mdk