1
votes

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

  1. Universal Windows Platform Development
  2. ASP.Net and Web Development
  3. .Net Desktop Development
  4. .Net Core cross-platform Development

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:

File ⇒ New Project ⇒ .Net Core ⇒ Asp.Net Core Application (.Net Core)

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.

This only happens when I select any .Net Core or .Net Standard project templates. Much appreciate your help in advance.

1

1 Answers

1
votes

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. Download NuGet

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

  2. Open the command prompt as “Administrator” – this is important other cache may not get cleared due to permission issues.

  3. Navigate to the folder where the NuGet is downloaded

  4. Run the following command to clear the cache

    nuget locals all -clear

  5. Open Visual Studio 2017

  6. Create a new ASP.Net core project with default templates

Hope this helps!