Omnisharp no se carga correctamente – Visual Studio Code y Unity
– UnityAssets3Free
hola , soy juansito y hoy os traigo
nueva pregunta curiosa
Cuando trato de abrir un unity script en vscode me sale un mensaje de error Some projects have trouble loading. Please review the output for more details.
. cuando selecciono Show Output
Obtengo esta salida:
Starting OmniSharp server at 7/5/2022, 6:09:26 PM
Target: /Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/First Unity Game.sln
OmniSharp server started with .NET 6.0.301
.
Path: /Users/angelalindsay/.vscode/extensions/ms-dotnettools.csharp-1.25.0-darwin-x64/.omnisharp/1.39.0-net6.0/OmniSharp.dll
PID: 2949
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on Unknown 0.0 (Unknown)
[info]: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: .NET Core SDK 6.0.301 17.2.0 - "/usr/local/share/dotnet/sdk/6.0.301/"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: .NET Core SDK 6.0.301 17.2.0 - "/usr/local/share/dotnet/sdk/6.0.301/"
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/First Unity Game.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game'.
[info]: OmniSharp.Script.ScriptProjectSystem
Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game' on host 2915.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assembly-CSharp.csproj'.
/Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assembly-CSharp.csproj
/usr/local/share/dotnet/sdk/6.0.301/Microsoft.Common.CurrentVersion.targets(1221,5): Error: This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).
[fail]: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assembly-CSharp.csproj
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
Inlay hints requested for document not in workspace Location FileName = /Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assets/Scripts/WayPointFollower.cs, Range = Range Start = Point Line = 0, Column = 0 , End = Point Line = 21, Column = 0
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
Inlay hints requested for document not in workspace Location FileName = /Users/angelalindsay/Desktop/Unity Projects/First Unity Game/First Unity Game/Assets/Scripts/WayPointFollower.cs, Range = Range Start = Point Line = 0, Column = 0 , End = Point Line = 21, Column = 0
No sé si esto está relacionado o no, pero autocompletar para unity tampoco funciona en vscode. Puedo escribir código y funciona en unity pero me gustaría tener autocompletar y deshacerme de este mensaje de error. ¿Puedo arreglar esto? Gracias.
1 respuesta 1
Este proyecto tiene como objetivo la versión de .NET que requiere ensamblajes de referencia que no están instalados (por ejemplo, .NET Framework). La solución más común es asegurarse de que Mono esté completamente actualizado en su máquina (https://mono-project.com/download/) y que está ejecutando la compilación de OmniSharp .NET Framework (p. ej., ‘omnisharp.useModernNet’: false en C# Extension para VS Code).
«¿Puedo arreglar esto?»
Si, solo configura omnisharp.useModernNet
propiedad a falso.
nota: si aun no se resuelve tu pregunta por favor dejar un comentario y pronto lo podremos de nuevo , muchas gracias
sin mas,espero que te funcione