【问题标题】:Visual Studio 2017 – Enterprise restarts on .Net Core ProjectsVisual Studio 2017 – 企业在 .Net Core 项目上重新启动
【发布时间】:2017-04-02 10:32:53
【问题描述】:

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

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

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

文件 ⇒ 新项目 ⇒ .Net Core ⇒ Asp.Net Core 应用程序(.Net Core)

Visual Studio 尝试加载所选模板,然后它突然消失,窗口显示对话框以检查联机帮助、调试或关闭它。 接下来,Visual Studio 重新启动到起始页。

仅当我选择任何 .Net Core 或 .Net Standard 项目模板时才会发生这种情况。 非常感谢您提前提供的帮助。

【问题讨论】:

    标签: visual-studio visual-studio-2017


    【解决方案1】:

    我遇到了完全相同的问题。 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. 以下是修复它的步骤:

    1. 下载 NuGet

      https://dist.nuget.org/win-x86-commandline/latest/nuget.exe

    2. 以“Administrator”身份打开命令提示符——这很重要 由于权限问题,缓存可能不会被清除。

    3. 导航到下载 NuGet 的文件夹

    4. 运行以下命令清除缓存

      nuget locals all -clear

    5. 打开 Visual Studio 2017

    6. 使用默认模板创建一个新的 ASP.Net 核心项目

    希望这会有所帮助!

    【讨论】:

    • 谢谢你的回答,让我试试。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-04
    • 1970-01-01
    相关资源
    最近更新 更多