0

I searched for more than an hour but it seems that the MVC template is missing This is normally what I need to have: Screenshot with MVC

But here's what I really have : MVC Missing

How I can fix it ? Thank you.

This isn't a duplicate with (Missing MVC template in Visual Studio 2015) : Web developer tools is no longer present on version 2017 of visual studio.

Sir Mishaa
  • 541
  • 1
  • 6
  • 19
  • Please show a screenshot of the selected packages in Visual Studio Installer – Camilo Terevinto Dec 26 '18 at 18:34
  • 1
    Possible duplicate of [Missing MVC template in Visual Studio 2015](https://stackoverflow.com/questions/32613505/missing-mvc-template-in-visual-studio-2015) – JuanR Dec 26 '18 at 18:37
  • The screenshot : https://i.stack.imgur.com/bSVJG.png – Sir Mishaa Dec 26 '18 at 18:37
  • If you read down the possible duplicate answers, you will find one with 30+ useful flags that explains the template appears only when you select a particular project type. – JuanR Dec 26 '18 at 18:45
  • Even if I select Web Form or all the particular projet type, MVC is still missing. _(In the Web category, I only have "ASP.NET Web Application" without MVC obviously :/)_ – Sir Mishaa Dec 26 '18 at 18:48
  • Can you tell us the menu entries you select in order to get to the dialog box in your snapshot? e.g. `File > New > Project >Visual C# > Web > ASP.NET Web Application (.NET Framework)` – JuanR Dec 26 '18 at 18:52
  • This might help too: https://stackoverflow.com/questions/41189398/no-templates-in-visual-studio-2017 – JuanR Dec 26 '18 at 19:11
  • New > Project > Visual C# > Web > ASP.NET Application (I only have this choice available) – Sir Mishaa Dec 26 '18 at 19:25
  • _In C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\CSharp\Web\ > I don't have MVC_ And the custom templates folder is empty.. What's wrong ? – Sir Mishaa Dec 26 '18 at 19:31
  • Is there a `1033` folder in the `Web` folder? I would suggest uninstalling the ASP.NET and Web Development workload and reinstalling it again. – JuanR Dec 26 '18 at 19:56
  • Yes, there is three folder in `1033` : WebApplicationProject40, WebTemplate45, WebTemplateCloud45. Yes, I'll will try, thank you anyway – Sir Mishaa Dec 26 '18 at 20:11
  • Those are the templates that you need. Apparently they are not being read. Uninstall and reinstall ASP.NET and Web Development workload. – JuanR Dec 26 '18 at 20:20
  • I found ! I analyzed the logs and there is an error with some asp.net packages. I don't know how I can fix it but that the pastbin of errors : https://pastebin.com/sMrHGUf7 – Sir Mishaa Dec 26 '18 at 20:37
  • It looks like it's failing to install IIS Express: `IIS Express 8.0 or higher is not installed.`. Long story short, it looks like you had other versions of Visual Studio installed in your machine and that is causing problems. Check this out: https://developercommunity.visualstudio.com/content/problem/24464/packageidmicrosoftancmiisexpressmsipackageactionin.html – JuanR Dec 26 '18 at 21:18
  • @ASmallCookie: Any luck? :-) – JuanR Dec 27 '18 at 15:38

2 Answers2

1

This is how I solved my problem :

  1. Go to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\ProjectTemplates\CSharp\Web\ and delete all

  2. Delete (Uninstall) IIS Express 8.0 and reboot your computer

And then, start Visual Studio Installer, and choose repair (It's going to take an hour. It's a bug I think, but the problem was IIS Express 8.0

(Thank JuanR)

Sir Mishaa
  • 541
  • 1
  • 6
  • 19
  • I did something similar and it fixed a different issue. I can now load ".deployproj" projects but I still cannot create them (still no template). – Peter L Sep 06 '19 at 17:38
  • I don't have a "Web" folder in CSharp – Bbb Jul 15 '21 at 18:44
0

I was able to get all the templates by performing the below steps.

1) Go to C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\common7\iDE\ProjectTemplates\csharp\web\1033\WebTemplateCloud45

2) Double click the WebTemplateCloud.vstemplate file and that brought me all the templates.