简体   繁体   中英

I cannot create any web project in Visual Studio 2015

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?

无法单击“确定”按钮

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仅在单击“确定”时显示成功的消息

UPDATE 3

Following Jims advice:

devenv /resetsettings
devenv /resetuserdata
devenv /installvstemplates

This now results in an error message:

新错误

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.

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.

I too had a similar situation where in I was unable to create any project. You can try going to Windows Update and install all the optional and recommended updates. See if this works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM