Global.asax 模板在 Visual Studio 中不可用
当我尝试向我的网络项目“添加新项目”(通过右键单击,添加新项目)时 - 没有适合它的模板。可能是什么问题?我用的是VS2008。
附加信息:
当我右键单击解决方案并“添加”、“新网站”时 - 我有零个模板可供选择。
我尝试运行 devenv /installvstemplates ,但此模板框仍然为空。
我的以下目录中只有三个模板。
有什么地方可以手动复制其他模板吗?
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\Web\CSharp\1033
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试打开 Visual Studio 命令提示符(以管理员身份)并从 VS 2008 安装路径(在我的例子中为 C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE)运行
devenv.exe /Setup
),或从相同的提示符运行:devenv /installvstemplates
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
这可能是您的项目类型。尝试创建一个 web 类型的新项目。
It is probably your project type. Try creating a new project of type web.
更新:
似乎有多人举报同样的问题。
有一个修补程序可能会对您有所帮助。
Update:
It looks like multiple people reported the same problem.
There's a hot fix available that might help you.
不幸的是,我的答案是重新安装 VS。不太确定问题是什么,但解决了它。
Unfortunately, the answer for me was re-installing VS. Not exactly sure what the issue was, but that fixed it.