[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in 'c:\Users\Downloads\Asn1Editor.WPF-master\Asn1Editor.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\Downloads\Asn1Editor.WPF-master\Asn1Editor\Asn1Editor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\Users\Downloads\Asn1Editor.WPF-master'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\Users\Downloads\Asn1Editor.WPF-master' on host 7668.
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\Downloads\Asn1Editor.WPF-master\Asn1Editor\Asn1Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
The reference assemblies for .NETFramework,Version=v4.5 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 'c:\Users\Downloads\Asn1Editor.WPF-master\Asn1Editor\Asn1Editor.csproj'.
c:\Users\Downloads\Asn1Editor.WPF-master\Asn1Editor\Asn1Editor.csproj
c:\Users\.vscode\extensions\ms-dotnettools.csharp-1.23.12\.omnisharp\1.37.10\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1216,5): Error: The reference assemblies for .NETFramework,Version=v4.5 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: c:\Users\Downloads\Asn1Editor.WPF-master\Asn1Editor\Asn1Editor.csproj
使用omnisharp时出现了.netframework找不到的情况
环境是win10,已经默认安装了4.8的netframework,很奇怪为何cannot found这个系统安装的最新的framework呢?
具体报错如上面显示。去它指示的路径看c:\Users\.vscode\extensions\ms-dotnettools.csharp-1.23.12\.omnisharp\1.37.10\.msbuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1216,5),看不懂。
怀疑最终问题是没有找到framework的路径,于是重新下载安装一个新的,当然网上有说win10因为已经安装了一个,版本低的安装不上,可以安装开发版本,试了一下,安装可以,但是路径设置到系统环境变量path之后,还是不行。
索性安装最新版本的
?可以看到它自动更新了系统变量,这个就是希望vscode能找到,最后在完成升级了vscode之后(有一篇文章介绍怎么最终实现win10的vscode更新,就是拷贝更新文件的问题),再重新安装了最新的.net SDK之后,重新启动之后,可以看到能执行dotnet --info了,也就是对vscode和omnisharp能找到它了,这样,对应的.csproj打不开的问题就不报了,是一个问题。
?
?
|