简体   繁体   English

VSCode:尝试更新未加载的项目

[英]VSCode: Attempted to update project that is not loaded

I am using VSC for Unity v2019.4.我正在为 Unity v2019.4 使用 VSC。 I have the package from package manager installed.我安装了 package 管理器中的 package。 Also I have installed dotnet.我也安装了dotnet。 The thing is that when I open VSC (through Unity) it shows in the output: Attempted to update project that is not loaded: C:\workspaces\Unity\MyGame\Assembly-CSharp.csproj .问题是,当我打开 VSC(通过 Unity)时,它显示在 output:尝试更新未加载的项目:C:\workspaces\Unity\MyGame\Assembly-CSharp.csproj am able to use the editor, but the Intellisense is not working.我能够使用编辑器,但 Intellisense 无法正常工作。 I also have tried to change the omnisharp version to latest and it is still not working.我也尝试将omnisharp版本更改为最新版本,但仍然无法正常工作。

You can try a few things in order to make Visual Studio Code works properly with Unity .您可以尝试一些方法以使Visual Studio CodeUnity一起正常工作。 First of all make sure that the editor package is installed in your project via Package Manager .首先确保通过Package Manager将编辑器 package 安装在您的项目中。 Latest version should be installed.应安装最新版本。 Just to be sure it's better to close the project, delete Library folder and all .csproj and .sln files.只是为了确保最好关闭项目,删除Library文件夹和所有.csproj.sln文件。 Then you can open your project in Unity again, wait it to load and try to remember to open scripts not by double clicking, but instead use right click in Project window and select Open C# Project .然后您可以再次在Unity中打开您的项目,等待它加载并尝试记住不要通过双击打开脚本,而是在Project window 和 select 中使用右键单击Open C# Project This will load the scripts without any issues.这将加载脚本没有任何问题。

In case anyone is still having this problem, try to install .net framework 4.7.1如果有人仍然遇到此问题,请尝试安装.net 框架 4.7.1

Try uninstalling then reinstalling vs code and dotnet latest version.尝试卸载然后重新安装 vs code 和 dotnet 最新版本。 Also make sure vs code is installed in a folder with permissions to edit.还要确保将 vs code 安装在具有编辑权限的文件夹中。 If not it will not save any files until you run as admin如果不是,它不会保存任何文件,直到您以管理员身份运行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM