问题描述
限时送ChatGPT账号..刚刚安装了具有以下工作负载的 Visual Studio 2017 – Enterprise Edition:
Just installed Visual Studio 2017 – Enterprise Edition with the following workloads:
通用 Windows 平台开发ASP.Net 和 Web 开发.Net 桌面开发.Net Core 跨平台开发此安装后,当我创建新的 core 或 标准项目时,visual studio 会在加载项目模板时重新启动.创建行为的步骤:
After this installation, when I create a new core or standard project, the visual studio restarts while loading the project template. Steps to create the behavior:
文件 ⇒ 新项目 ⇒ .Net Core ⇒ Asp.Net Core 应用程序 (.Net Core)
File ⇒ New Project ⇒ .Net Core ⇒ Asp.Net Core Application (.Net Core)
Visual Studio 尝试加载所选模板,然后它突然消失,窗口显示对话框以检查在线帮助、调试或关闭它.接下来,visual studio 重新启动到起始页.
Visual Studio tries to load the selected template then suddenly it disappears and the windows show the dialogue box to Check online help, debug or close it. Next, visual studio reboots to the start page.
这仅在我选择任何 .Net Core 或 .Net Standard 项目模板时发生.非常感谢您的帮助.
This only happens when I select any .Net Core or .Net Standard project templates. Much appreciate your help in advance.
推荐答案
我遇到了完全相同的问题.It turned out that when a .Net core or .Net standard project template is selected, it tries to restore the packages from NuGet and somehow it was unable to do that or clear the NuGet’s local cache.以下是修复它的步骤:
I had the exact same issue. It turned out that when a .Net core or .Net standard project template is selected, it tries to restore the packages from NuGet and somehow it was unable to do that or clear the NuGet’s local cache. Here are the steps to fix it:
下载 NuGet
Download NuGet
https://dist.nuget/win-x86-commandline/latest/nuget.exe
以管理员"身份打开命令提示符——这很重要由于权限问题,缓存可能无法清除.
Open the command prompt as "Administrator" – this is important other cache may not get cleared due to permission issues.
导航到下载 NuGet 的文件夹
Navigate to the folder where the NuGet is downloaded
运行以下命令清除缓存
nuget locals all -clear
nuget locals all -clear
打开 Visual Studio 2017
Open Visual Studio 2017
使用默认模板创建一个新的 ASP.Net 核心项目
Create a new ASP.Net core project with default templates
希望这会有所帮助!
这篇关于Visual Studio 2017 – Enterprise 在 .Net Core 项目上重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论