问题
When I attempt to "add new item" to my web project (by right-clicking, add new item) - there is no template for it. What might the problem be? I'm using VS2008.
Additional Info:
When I right click on the solution and "Add", "New Web Site" - I have zero tempates to choose from.
I have tried running devenv /installvstemplates
and this template box is still empty.
I have only three templates in the following directory.
Is there somewhere I can just copy the other templates from manually?
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033
回答1:
Try opening the Visual Studio command prompt (as an administrator) and run devenv.exe /Setup
from your VS 2008 installation path (C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE in my case), or run from the same prompt: devenv /installvstemplates
回答2:
It is probably your project type. Try creating a new project of type web.
回答3:
Update:
It looks like multiple people reported the same problem.
There's a hot fix available that might help you.
回答4:
Unfortunately, the answer for me was re-installing VS. Not exactly sure what the issue was, but that fixed it.
来源:https://stackoverflow.com/questions/1500688/global-asax-template-not-available-in-visual-studio