将ASP.NET MVC添加到Webforms应用程序-如何在VS2010中获取MVC菜单选项? [英] Adding asp.net mvc to webforms application - how do I get MVC menu options in VS2010?

查看:55
本文介绍了将ASP.NET MVC添加到Webforms应用程序-如何在VS2010中获取MVC菜单选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET WebForms应用程序,正在向其中添加一些ASP.NET MVC.

I have an ASP.NET WebForms application that I'm adding some ASP.NET MVC to.

我可以使用它,但是如何使Visual Studio识别它现在是MVC项目,并为我提供上下文菜单选项以在控制器操作方法中添加视图等?

I have it working, but how can I get Visual Studio to recognise that it's now an MVC project and give me the context menu options to add a view, etc. inside a controller action method?

推荐答案

使用您喜欢的文本编辑器(不是Visual Studio)打开.csproj文件,并添加以下GUID:

Open the .csproj file with your favorite text editor (not Visual Studio) and add the following GUID:

<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{fae04ec0-301f-11d3-bf4b-00c04f79efbc};{349c5851-65df-11da-9384-00065b846f21}</ProjectTypeGuids>

注意{F85E285D-A4E0-4152-9332-AB1D724D3325} GUID.这表明它是一个ASP.NET MVC项目.

Notice the {F85E285D-A4E0-4152-9332-AB1D724D3325} GUID. This is what indicates that it is an ASP.NET MVC project.

将此GUID添加到ProjectTypeGuids节点后,您将获得上下文菜单.

Once this GUID added to the ProjectTypeGuids node you will get the context menus.

这篇关于将ASP.NET MVC添加到Webforms应用程序-如何在VS2010中获取MVC菜单选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆