Global.asax template not available in Visual Studio

大兔子大兔子 提交于 2019-12-13 15:17:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!