Visual Studio 2017 – Enterprise 在 .Net Core 项目上重新启动

编程入门 行业动态 更新时间:2024-10-27 15:19:05
本文介绍了Visual Studio 2017 – Enterprise 在 .Net Core 项目上重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送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:关键词]

本文发布于:2023-04-27 13:10:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154955.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重新启动   项目   Studio   Visual   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!