Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I cannot create any web project in Visual Studio 2015

Tags:

c#

asp.net

For some reason I cannot create a new web project after having installed the latest .NET Core SDK/CLI. In the "New ASP.NET Web Application" dialog window I selected an "Empty" project and checked the "Web API" checkbox, before clicking the "OK" button. No error messages are displayed, absolutely nothing happens. I tried a set of combinations of projects and checkboxes + tabbing and using space to invoke the button. None of it works. Also tried repairing VS and restarting computer.

Any ideas?

Cannot click 'OK' button

UPDATE

I have tried to uninstall and reinstall Visual Studio, also tried disabling all extensions and removing ReSharper. Still no success. I read here that someone with the same issue had to use NetBeans (the horror), but solved it by reinstalling VS which does not seem to help in my case.

UPDATE 2

Using the Process Monitor, the only thing I can derive from VS2015 are success messages in finding the ASP.NET template.

Process Monitor only displays successful messages when 'OK' is clicked

UPDATE 3

Following Jims advice:

devenv /resetsettings
devenv /resetuserdata
devenv /installvstemplates

This now results in an error message:

New error

like image 750
Marcus Avatar asked Jun 03 '16 13:06

Marcus


2 Answers

You can try and reset the visual studio templates and settings.

devenv /resetsettings
devenv /resetuserdata
devenv /installvstemplates

These will restore all the settings to their defaults, and also importantly, reset all the project templates to their defaults.

like image 63
Jim Avatar answered Nov 13 '22 20:11

Jim


It could be an issue with the GAC. This may be confirmed by this potentially related SO thread.

Please open the Developer Command Prompt as administrator and try running these commands:

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Publish.dll"

gacutil -i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\Publish\Microsoft.VisualStudio.Web.Internal.Contracts.dll"

If you cannot find the DLLs in the paths I have given, please do a search in the various visual studio folders you have in Program Files until you find it, then update the path in the command above.

like image 3
Jim Yarbro Avatar answered Nov 13 '22 19:11

Jim Yarbro