[英]Visual Studio 2019 Doesn't seem to see that I have .NET Core 3.1 Installed (with SDK)
I just installed Visual Studio a few days ago and for some reason I can't create anything but a class.几天前我刚刚安装了 Visual Studio,出于某种原因,我只能创建一个类。
When I go to create a new User Control the pop up window lets me do everything except for click the "Add" Button to close the window and create the control.当我去创建一个新的用户控件时,弹出窗口让我可以做所有事情,除了单击“添加”按钮关闭窗口并创建控件。
If I double-click the User Control selector to create automatically, it pops up an alert box that says I need to go to the installer to get the .NET Framework target libraries.如果我双击用户控件选择器以自动创建,它会弹出一个警告框,提示我需要转到安装程序以获取 .NET Framework 目标库。 But when I go to the project's properties I see that I am already targeting .NET Core 3.1 and the only other option I have to target is .NET Core 3.0.... I assume this is because I'm in a .NET Core WPF application but I have no idea why it won't let me create a new control.
但是当我转到项目的属性时,我发现我已经针对 .NET Core 3.1,而我必须针对的唯一其他选项是 .NET Core 3.0 .... 我认为这是因为我在 .NET Core 中WPF 应用程序,但我不知道为什么它不允许我创建新控件。 It won't let me create anything except for a new class.
除了一个新类,它不会让我创建任何东西。
What is going on here?这里发生了什么? How can I work around this bug?
我该如何解决这个错误?
I'v faced your problem recently.我最近遇到了你的问题。 most of templates were not installed after installation.
大多数模板安装后没有安装。
something you have to do is Modifying your installation.您必须做的是修改您的安装。
open Visual Studio Installer
and click on Modify
then choose the features
(.Net core,Asp.net,Desktop Application and etc) in order to re-install them.打开
Visual Studio Installer
并单击Modify
然后选择features
(.Net 核心、Asp.net、桌面应用程序等)以重新安装它们。
keep it in mind that, if installer
encounters any problem or missing dll
.请记住,如果
installer
遇到任何问题或缺少dll
。 installation instantly will be completed that should not happen.安装即刻将完成的是不应该发生的。 keep your eyes close to your
installer
process and make sure all packages are installed.保持你的眼睛接近你的
installer
过程,并确保所有的包都安装。
a successful installation MUST not have any warning otherwise there are packages not installed.成功安装必须没有任何警告,否则没有安装软件包。
it's better to install packages one by one NOT totally.i mean if you want Asp.Net Core
feature then try to install it at first.最好一个一个安装包,而不是完全安装。我的意思是如果你想要
Asp.Net Core
功能,那么首先尝试安装它。 then try to install another feature.然后尝试安装另一个功能。 Actually i was not able to install whole features at single installation and i don't know why.
实际上,我无法在单次安装时安装全部功能,我不知道为什么。 in short , don't heavy your installation .
总之,不要重装你的安装。
If the problem still exists then:如果问题仍然存在,则:
1. Close all open solutions 1.关闭所有打开的解决方案
2. Run InstallCleanup.exe
2.运行
InstallCleanup.exe
C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\layout\\InstallCleanup.exe C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\layout\\InstallCleanup.exe
3. Remove all existing Visual Studio
programs from Control Panel -> program features
3.从
Control Panel -> program features
删除所有现有的Visual Studio
程序Control Panel -> program features
4. Restart pc and re-install Visual Studio 4.重启电脑,重新安装Visual Studio
5. Make sure you have connected to network 5.确保您已连接到网络
6. Choose only one feature(Don't select all) to install + Visual Studio Editor 6.仅选择一项功能(不要全选)进行安装 + Visual Studio Editor
Extensions don't work properly in VS 2019 and make it hang.it's may happen because of the Extensions have to be updated to be compatible to vs 2019 or it's vs bug.扩展在 VS 2019 中无法正常工作并使其挂起。这可能是因为扩展必须更新以兼容 2019 或它的错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.