[英]Missing .NET Standard 2.0 Framework with .NET Core SDK 2.2.1 & .NET Framework 4.7.2
I created a .NET Standard Class library which seems to point to 1.6, but when I go to change it to v2.0, I don't see it in the list:我创建了一个似乎指向 1.6 的 .NET 标准类库,但是当我将其更改为 v2.0 时,我没有在列表中看到它:
Also attached is the latest info from my machine and versions, I have installed both the .NET Core 2.2.1 x64 & x86 SDKs and I have the .NET Full Framework 4.7.2.还附上了我的机器和版本的最新信息,我已经安装了 .NET Core 2.2.1 x64 和 x86 SDK,并且我有 .NET Full Framework 4.7.2。 I'm using VS 2017, v15.9.3.我正在使用 VS 2017,v15.9.3。
Just reinstalled VS, here's how that looked:刚刚重新安装 VS,这是它的样子:
Reinstalling VS did not end up working, so I tried reinstalling Windows and then VS, which did the trick... Is there an easier, more consistent way to fix this?重新安装 VS 并没有成功,所以我尝试重新安装 Windows,然后重新安装 VS,这成功了……有没有更简单、更一致的方法来解决这个问题?
My team got into this issue.我的团队陷入了这个问题。 Though we installed all.Net Core SDK but VS2017 targer framework was showing up to.Net Standard 1.6.虽然我们安装了 all.Net Core SDK,但 VS2017 目标框架显示为 .Net Standard 1.6。 After searching a lot, we found all.Net Core SDK versions installed(latest till 2.2.10) are 64 bit except one 2.2.301 which is x86 version.经过大量搜索,我们发现所有安装的 .Net Core SDK 版本(最新到 2.2.10)都是 64 位的,除了一个 2.2.301 是 x86 版本。
Command dotnet --info helped us to find the same.命令dotnet --info帮助我们找到相同的。 In dotnet --info output, Base path was pointing to C:\Program Files (x86)\dotnet\sdk\2.2.301\在 dotnet --info 输出中,基本路径指向 C:\Program Files (x86)\dotnet\sdk\2.2.301\
SDK paths: C:\Program Files\dotnet\sdk SDK路径:C:\Program Files\dotnet\sdk
C:\Program Files (x86)\dotnet\sdk C:\Program Files (x86)\dotnet\sdk
Finally, we uninstalled the x86 version and then the Environment path reset and pointed to 64 bits SDKs as shown in below diagram.最后,我们卸载了 x86 版本,然后重置环境路径并指向 64 位 SDK,如下图所示。 Now, targer framework is pointing to.Net Standard 2.0.现在,目标框架指向.Net Standard 2.0。
I just ran into this issue.我刚遇到这个问题。 Reinstalling the sdk and VS didn't help.重新安装 sdk 和 VS 没有帮助。 The issue ended up being an incorrect order of paths in the System Path variable.问题最终是系统路径变量中的路径顺序不正确。 As soon as I moved C:\Program Files\dotnet\
before C:\Program Files (x86)\dotnet\
VS was able to pickup the correct sdks.只要我移动C:\Program Files\dotnet\
之前C:\Program Files (x86)\dotnet\
VS 就能够获取正确的 sdks。
I had the very same problem, even went as far as reporting it to Microsoft.我遇到了同样的问题,甚至向微软报告了。 It only happens with a clean install, so people checking it on their long used and upgraded systems wouldn't be able to help.它只发生在全新安装时,因此人们在他们长期使用和升级的系统上检查它将无济于事。
But, after many desperate tries and giving up, I switched off the computer and fired it up next morning.但是,在多次绝望的尝试和放弃之后,我关掉了电脑,第二天早上启动了它。 And VS was working all right, with the 2.0 where it should be. VS 工作正常,2.0 在它应该的地方。
I know this isn't a proper, reliable and repeatable solution but maybe it'll spare the trouble of reinstalling everything for somebody... :-)我知道这不是一个合适的、可靠的和可重复的解决方案,但也许它会省去为某人重新安装所有东西的麻烦……:-)
我安装了.Net Core 2.2.109 https://dotnet.microsoft.com/download/dotnet-core/2.2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.