我一直在使用vscode来编辑我的统一脚本,但是最近我无法对脚本使用自动完成功能,由于某些原因,在我的旧项目intellisense上似乎可以正常工作,但是我尝试使用任何新项目只是不起作用,这是omnisharp的输出:(是的,我已经为此框架版本安装了目标包)。
我还尝试过重新安装vscode并重置设置,似乎没有任何作用。
Omnisharp server running using Stdio at location 'c:\Users\Lincoln\Documents\Prototype SI' on host 7244.
The reference assemblies for framework ".NETFramework,Version=v4.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.
Failed to load project file 'c:\Users\Lincoln\Documents\Prototype SI\Assembly-CSharp.csproj'.
c:\ Users \ Lincoln \ Documents \ Prototype SI \ Assembly-CSharp.csproj C:\ Users \ Lincoln.vscode \ extensions \ ms-vscode.csharp-1.18.0.omnisharp \ 1.32.11 \ msbuild \ 15.0 \ Bin \ Microsoft.Common.CurrentVersion.targets(1126,5):错误:引用找不到框架“ .NETFramework,Version = v4.5”的程序集。要解决此问题,请为此框架版本安装SDK或Targeting Pack,或将您的应用程序重新定位到已为其安装SDK或Targeting Pack的框架版本。请注意,程序集将从全局程序集缓存(GAC)中解析,并将代替参考程序集。因此,您的程序集可能未正确定位到您想要的框架。
Attempted to update project that is not loaded: c:\Users\Lincoln\Documents\Prototype SI\Assembly-CSharp.csproj
Miscellaneous file: c:\Users\Lincoln\Documents\Prototype SI\Assets\Player.cs added to workspace
答案 0 :(得分:0)
尝试从vs代码中找到项目文件夹。在vs代码中单击打开的文件夹,然后导航到您的项目。