I have integrated ASP.NET MVC 4 into existing asp.net web site. Both works fine but I don't see any menu/shortcuts to create controller/view within visual studio IDE. Are those only available to ASP.NET MVC template?
相关问题
- Carriage Return (ASCII chr 13) is missing from tex
- MVC-Routing,Why i can not ignore defaults,The matc
- How to know full paths to DLL's from .csproj f
- How to store image outside of the website's ro
- Importing NuGet references through a local project
相关文章
- asp.net HiddenField控件扩展问题
- asp.net HiddenField控件扩展问题
- Asp.Net网站无法写入错误日志,测试站点可以,正是站点不行
- asp.net mvc 重定向到vue hash字符串丢失
- FormsAuthenticationTicket expires too soon
- How to show location of errors, references to memb
- MVC CDN fallback for Style Bundle
- “Dynamic operations can only be performed in homog
I had the same problem when opened MVC project as Web Site. I reopened solution thru Open -> Project and this functionality worked as I expected.
You are correct. The presence of these context menu options is project type/template specific.
Step to change the GUID
In
<ProjectTypeGuids>
tag add any of these GUIDs in beginningVS2012 Context menu to Add Controller/View missing
In VS2012 & MVC4 try unistall Web API 5.2 in PM:
When all else fails (before reinstalling VS2015) you might want to reset VS cache. This worked for me (after repairing - NOT meddling with GUIDS). Just delete the contents in the folders mentioned in this link (takes about 30 seconds), then execute the command. That takes another 10 seconds. Restart VS and you will see the screens of a first-time user in VS. It worked like a charm.
http://blogs.msdn.com/b/willy-peter_schaub/archive/2010/09/15/if-you-have-problems-with-tfs-or-visual-studio-flush-the-user-cache-or-not.aspx
Yes, but you could cheat. The way Visual Studio shows those shortcuts is by looking at the project type and if it sees that it is an ASP.NET MVC project it will make them available. But how does it know it is an ASP.NET MVC project? After all ASP.NET MVC is an ASP.NET project.
Open the
.csproj
file and look for the<ProjectTypeGuids>
node of your ASP.NET MVC 4 project. You will see something like this:Now open the
.csproj
file of your regular ASP.NET project and simply add the{E3E379DF-F4C6-4180-9B81-6769533ABE47}
GUID as first item in the list (if you don't project does not even load). That's all. Now you will see the ASP.NET MVC specific context menus in your WebForms project.