Unity3D в Ubuntu 19.10 с расширением vscode и C#: появляется ошибка, автозаполнение не работает - PullRequest
2 голосов
/ 02 апреля 2020

Я веб-разработчик (symfony <3;) C# и технологии Microsoft являются новыми для меня! ) и во время скрытого содержания я хочу создать простую игру с игровым движком Unity </p>

On Ubuntu 19.10 , я скачал Unity Hub v2.3.0 ( https://unity3d.com/get-unity/download)

Из Unity Hub я установил unity3D v2019.3.7f1 (последняя стабильная версия) с некоторыми параметрами (Linux & WebGL & windows поддержка сборки )

enter image description here

И я создал простую 2D-игру

enter image description here

Все работает как чудо, я могу без проблем открыть свой проект и запустить новую игру в консоли unity3D

Из Unity, когда я создаю сценарий c#, файл может быть открытым моим (очень простым) текстовым редактором gedit. Теперь я хочу установить перекрестный визуальный код IDE, благодаря чему я получу несколько полезных расширений и код автозаполнения при редактировании своих скриптов Unity.

Итак, я установил vscode через apt install (я следовал это официальное руководство: https://code.visualstudio.com/docs/setup/linux)

Моя версия vscode:

enter image description here

После некоторой паутины поиск, я понимаю, я должен установить. NET Framework (может быть, я ошибаюсь?)

enter image description here

My do tnet версия (с терминал: do tnet --version) равен 3.1.201

Далее я настроил параметр единицы для изменения текстового редактора по умолчанию:

enter image description here

  • Внешний редактор сценариев: код
    • код ссылается на путь / usr / bin / code, исполняемый файл vscode
  • Внешний редактор сценариев Аргументы: "$ (ProjectPath)" -g "$ (Файл)": $ (строка): $ (столбец)
    • значение по умолчанию, я ничего не изменил

Я создал простой c# скрипт Из единства я открыл файл, и vscode открылся автоматически (да!). А из vscode я добавил две переменные publi c (bool 'a' и Rigidbody2D 'b')

enter image description here

Я сохранил свой скрипт и Приложение go to unity, переменные a и b видны на интерфейсе:

enter image description here

Все работает! Но теперь я хочу получить код автозаполнения от vscode. Итак, я установил расширения vscode c#. Но после завершения установки появляется следующее сообщение:

enter image description here

Весь журнал выглядит так:

Starting OmniSharp server at 4/2/2020, 8:10:51 PM
    Target: /home/okli/UnityProjects/SampleGame/SampleGame.sln

OmniSharp server started.
    Path: /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/run
    PID: 15372

[info]: OmniSharp.Stdio.Host
    Starting OmniSharp on ubuntu 19.10 (x64)
[info]: OmniSharp.Services.DotNetCliService
    DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    Located 1 MSBuild instance(s)
        1: StandAlone 16.4 - "/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    MSBUILD_EXE_PATH environment variable set to '/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    Registered MSBuild instance: StandAlone 16.4 - "/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin"
        CscToolExe = csc.exe
        MSBuildToolsPath = /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin
        CscToolPath = /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Roslyn
        BypassFrameworkInstallChecks = true
        MSBuildExtensionsPath = /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild
[info]: OmniSharp.Cake.CakeProjectSystem
    Detecting Cake files in '/home/okli/UnityProjects/SampleGame'.
[info]: OmniSharp.Cake.CakeProjectSystem
    Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
    Detecting projects in '/home/okli/UnityProjects/SampleGame/SampleGame.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
    Queue project update for '/home/okli/UnityProjects/SampleGame/Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
    Detecting CSX files in '/home/okli/UnityProjects/SampleGame'.
[info]: OmniSharp.Script.ScriptProjectSystem
    Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
    Configuration finished.
[info]: OmniSharp.Stdio.Host
    Omnisharp server running using Stdio at location '/home/okli/UnityProjects/SampleGame' on host 14406.
[info]: OmniSharp.MSBuild.ProjectManager
    Loading project: /home/okli/UnityProjects/SampleGame/Assembly-CSharp.csproj
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.Timeline.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Animation.Runtime.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.PixelPerfect.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.VSCode.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.SpriteShape.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.TextMeshPro.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Path.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'UnityEngine.UI.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.Timeline.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Animation.Triangle.Runtime.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'PsdPlugin.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.CollabProxy.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.Rider.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.Mathematics.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Psdimporter.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.InternalAPIEngineBridge.001.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Sprite.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Common.Runtime.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Tilemap.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.SpriteShape.Runtime.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.PixelPerfect.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Animation.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.Mathematics.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.TextMeshPro.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.2D.Common.Editor.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'Unity.InternalAPIEditorBridge.001.csproj' does not exist.
[warn]: OmniSharp.MSBuild.ProjectLoader
    The referenced project 'UnityEditor.UI.csproj' does not exist.
[fail]: OmniSharp.MSBuild.ProjectLoader
    The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
    Failed to load project file '/home/okli/UnityProjects/SampleGame/Assembly-CSharp.csproj'.
/home/okli/UnityProjects/SampleGame/Assembly-CSharp.csproj
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.Timeline.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Animation.Runtime.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.PixelPerfect.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.VSCode.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.SpriteShape.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.TextMeshPro.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Path.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'UnityEngine.UI.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.Timeline.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Animation.Triangle.Runtime.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'PsdPlugin.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.CollabProxy.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.Rider.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.Mathematics.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Psdimporter.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.InternalAPIEngineBridge.001.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Sprite.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Common.Runtime.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Tilemap.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.SpriteShape.Runtime.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.PixelPerfect.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Animation.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.Mathematics.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.TextMeshPro.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.2D.Common.Editor.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'Unity.InternalAPIEditorBridge.001.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1870,5): Error: The referenced project 'UnityEditor.UI.csproj' does not exist.
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[fail]: OmniSharp.MSBuild.ProjectManager
    Attempted to update project that is not loaded: /home/okli/UnityProjects/SampleGame/Assembly-CSharp.csproj

Что-то, похоже, не работа ... Тем не менее, я могу изменить и сохранить свой сценарий c# (например, добавить новый publi c var, переменная добавляется в интерфейс Unity), но код автозаполнения не работает, когда я набираю public Rigidbod и нажмите ctrl + space, автозаполнение не отображается.

Я не знаком с C# / vscode / microsoft technologies, я предпочитаю спросить здесь, если я что-то забыл и / или сделал что-то не так, прежде чем попробовать (плохие) решения

Спасибо за помощь!

РЕДАКТИРОВАТЬ: Я только что уведомил об этой ошибке на интерфейсе unity3D

enter image description here

Я сделаю некоторые поиски об этой ошибке ...

РЕДАКТИРОВАТЬ после 0xBFE1A8 ответ:

  • Я создал новый проект 'plop'
  • В UnityEditor я изменил код Visual Studio Редактор версии 1.1.3 и нажмите кнопку «Обновить 1.1.3»

ошибка не исчезает, поэтому я продолжил:

  • Я изменил "com .unity.ide.vscode "до 1.1.3 в" Packages / manifest. json "
  • В UnityEditor установлен флажок" Создать все файлы .csproj "
  • , а затем Я нажимаю «Reimport All» в меню Assets

После всего этого автозаполнение кода во vsecode не работает, но журнал ошибок меньше:

Starting OmniSharp server at 4/5/2020, 6:56:52 PM
    Target: /home/okli/UnityProjects/plop/plop.sln

OmniSharp server started.
    Path: /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/run
    PID: 30149

[info]: OmniSharp.Stdio.Host
    Starting OmniSharp on ubuntu 19.10 (x64)
[info]: OmniSharp.Services.DotNetCliService
    DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    Located 1 MSBuild instance(s)
        1: StandAlone 16.4 - "/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    MSBUILD_EXE_PATH environment variable set to '/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
    Registered MSBuild instance: StandAlone 16.4 - "/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin"
        CscToolExe = csc.exe
        MSBuildToolsPath = /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin
        CscToolPath = /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Roslyn
        BypassFrameworkInstallChecks = true
        MSBuildExtensionsPath = /home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild
[info]: OmniSharp.Cake.CakeProjectSystem
    Detecting Cake files in '/home/okli/UnityProjects/plop'.
[info]: OmniSharp.Cake.CakeProjectSystem
    Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
    Detecting projects in '/home/okli/UnityProjects/plop/plop.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
    Queue project update for '/home/okli/UnityProjects/plop/Assembly-CSharp.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
    Detecting CSX files in '/home/okli/UnityProjects/plop'.
[info]: OmniSharp.Script.ScriptProjectSystem
    Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
    Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
[info]: OmniSharp.WorkspaceInitializer
    Configuration finished.
[info]: OmniSharp.Stdio.Host
    Omnisharp server running using Stdio at location '/home/okli/UnityProjects/plop' on host 30017.
[info]: OmniSharp.MSBuild.ProjectManager
    Loading project: /home/okli/UnityProjects/plop/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
    The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
[warn]: OmniSharp.MSBuild.ProjectManager
    Failed to load project file '/home/okli/UnityProjects/plop/Assembly-CSharp.csproj'.
/home/okli/UnityProjects/plop/Assembly-CSharp.csproj
/home/okli/.vscode/extensions/ms-dotnettools.csharp-1.21.16/.omnisharp/1.34.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1193,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

[fail]: OmniSharp.MSBuild.ProjectManager
    Attempted to update project that is not loaded: /home/okli/UnityProjects/plop/Assembly-CSharp.csproj

1 Ответ

3 голосов
/ 05 апреля 2020

Это предупреждение - известная ошибка Visual Studio Code Editor 1.1.4 . Согласно этой информации , это Omnisharp расширение, которое вызывает ошибку:

Эта проблема вызвана расширением, пожалуйста, подайте его в хранилище ( или свяжитесь с) расширение связал в своем обзоре в VS Code или на рынке для VS Code. См. Также наши рекомендации по составлению отчетов о проблемах.

Happy Coding!

Для меня снижение версии до 1.1.3 пакета решило проблемы.

В UnityEditor go до: [Окно] -> [Диспетчер пакетов] -> [Редактор кода Visual Studio] ->: выберите версию 1.1.3 и нажмите «Обновить 1.1» .3 "Кнопка.

enter image description here

Если после этого ошибки не исчезнут go:

  • 1) Изменено "com.unity.ide.vscode": "1.1.3" in "Пакеты / манифест. json"
  • 2) In UnityEditor go в: [Редактировать] -> [Предпочтения] -> [Внешние инструменты]: Установить " Создать все файлы .csproj " CheckBox в true .
  • 3) В UnityEditor go to: [Assets] -> [Reimport All]

Некоторые люди говорят, что если вы понижаетесь до 1.1.3 и сразу после обновления до 1.2.0 ошибки должны быть исправлены, но я не пробовал.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...