matrem
December 16, 2016, 2:01pm
1
I tried to use Visual Studio Code on my linux, as an alternative to monodevelop.
But symbols are not loaded, resulting in not being able to navigate threw symbols (even go to definition).
It’s working with basic .net core projects.
And I have this error when I load the unity folder in visual studio code :
[INFORMATION:OmniSharp#MSBuild] Loading project from ‘…/Assembly-CSharp.csproj’.
[WARNING:OmniSharp#ProjectFileInfo] Couldn’t locate Mono, TargetFrameworkRootPath not specified
[INFORMATION:OmniSharp#ProjectFileInfo] Using tools version: 15.0
[ERROR:OmniSharp#ProjectFileInfo] The reference assemblies for framework “.NETFramework,Version=v3.5” were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
[WARNING:OmniSharp#MSBuild] Failed to process project file ‘…/Assembly-CSharp.csproj’.
…Assembly-CSharp.csproj
Is there some ways to get it working?
Have you tried installing mono-complete?:
sudo apt-get install mono-complete
matrem
December 21, 2016, 7:11am
3
After this install it seems that this error disappeared. But another comes out, and symbol navigation still does not work :
System.InvalidOperationException: The item metadata “%(FullPath)” cannot be applied to the path “//mscorlib.dll ”. UNC paths should be of the form \server\share.
at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation (System.String resourceName, System.Object[ ] args) [0x00019] in <1be2c21a97cd402db77c8e905b7fd466>:0
at Microsoft.Build.Shared.ErrorUtilities.VerifyThrowInvalidOperation (System.Boolean condition, System.String resourceName, System.Object arg0, System.Object arg1, System.Object arg2) [0x00008] in <1be2c21a97cd402db77c8e905b7fd466>:0
at Microsoft.Build.Shared.FileUtilities+ItemSpecModifiers.GetItemSpecModifier (System.String currentDirectory, System.String itemSpec, System.String definingProjectEscaped, System.String modifier, System.String& fullPath) [0x004a6] in <1be2c21a97cd402db77c8e905b7fd466>:0
at Microsoft.Build.Evaluation.BuiltInMetadata.GetMetadataValueEscaped (System.String currentDirectory, System.String evaluatedIncludeBeforeWildcardExpansionEscaped, System.String evaluatedIncludeEscaped, System.String definingProjectEscaped, System.String name, System.String& fullPath) [0x00031] in <1be2c21a97cd402db77c8e905b7fd466>:0
at Microsoft.Build.Execution.ProjectItemInstance+TaskItem.GetBuiltInMetadataEscaped (System.String name) [0x00013] in <1be2c21a97cd402db77c8e905b7fd466>:0
at Microsoft.Build.Execution.ProjectItemInstance+TaskItem.GetMetadataEscaped (System.String metadataName) [0x000c6] in <1be2c21a97cd402db77c8e905b7fd466>:0
at Microsoft.Build.Execution.ProjectItemInstance+TaskItem.GetMetadata (System.String metadataName) [0x00001] in <1be2c21a97cd402db77c8e905b7fd466>:0
at (wrapper remoting-invoke-with-check) Microsoft.Build.Execution.ProjectItemInstance+TaskItem:GetMetadata (string)
at Microsoft.Build.Execution.ProjectItemInstance.GetMetadataValue (System.String name) [0x00001] in <1be2c21a97cd402db77c8e905b7fd466>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.GetFullPath (Microsoft.Build.Execution.ProjectItemInstance projectItem) [0x00000] in <74121264d107471c8ada77b45db06c06>:0
at System.Linq.Enumerable+WhereSelectEnumerableIterator2[TSource,TResult].MoveNext () [0x00064] in <63992662b765477a898ef49cdcc99ee2>:0 at System.Collections.Generic.List1[T]…ctor (System.Collections.Generic.IEnumerable1[T] collection) [0x0008b] in <8f2c484307284b51944a1a13a14c0266>:0 at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x00011] in <63992662b765477a898ef49cdcc99ee2>:0
at OmniSharp.MSBuild.ProjectFile.ProjectFileInfo.Create (System.String projectFilePath, System.String solutionDirectory, Microsoft.Extensions.Logging.ILogger logger, OmniSharp.Options.MSBuildOptions options, System.Collections.Generic.ICollection`1[T] diagnostics) [0x00285] in <74121264d107471c8ada77b45db06c06>:0
at OmniSharp.MSBuild.MSBuildProjectSystem.CreateProjectFileInfo (System.String projectFilePath) [0x00024] in <74121264d107471c8ada77b45db06c06>:0
pimpke
April 26, 2017, 1:08pm
4
I’ve just upgraded the version of mono and it works as expected now:
mono --version
Mono JIT compiler version 4.8.1 (Stable 4.8.1.0/22a39d7 Wed Apr 12 12:00:40 UTC 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
I have the same problem as matrem and installed version 4.2.1 how to update it ot 4.8.1 ?
I did
sudo apt-get purge --auto-remove mono-complete
then went there: Redirecting…
following steps to intstall mono-devel
Now I have version 5.0.0.94 (beta)
Error is gone, If it will not work I’ll let you know
Huh I was trying to set visual studio code working but it seems fruitless as unity does not see changes (no compilation)
Now I cannot connect scripts into prefabs ;(
Do I have to reinstall everything again ?
It’s a bit off topic, but have you considered Rider ? I’ve switched from MonoDevelop to Rider with great result, and currently it’s freely available too.