Visual Studio 2017 – Enterprise 在 .Net Core 项目上重新启动 [英] Visual Studio 2017 – Enterprise restarts on .Net Core Projects

查看:47
本文介绍了Visual Studio 2017 – Enterprise 在 .Net Core 项目上重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚安装了具有以下工作负载的 Visual Studio 2017 – Enterprise Edition:

Just installed Visual Studio 2017 – Enterprise Edition with the following workloads:

  1. 通用 Windows 平台开发
  2. ASP.Net 和 Web 开发
  3. .Net 桌面开发
  4. .Net Core 跨平台开发

此安装后,当我创建新的 .net core 或 .net 标准项目时,visual studio 会在加载项目模板时重新启动.创建行为的步骤:

After this installation, when I create a new .net core or .net 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:

  1. 下载 NuGet

  1. Download NuGet

https://dist.nuget.org/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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆