{"id":3894,"date":"2009-01-26T19:44:00","date_gmt":"2009-01-26T19:44:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2009\/01\/26\/whats-new-for-mvc-tools-in-the-asp-net-mvc-1-0-release-candidate\/"},"modified":"2009-01-26T19:44:00","modified_gmt":"2009-01-26T19:44:00","slug":"whats-new-for-mvc-tools-in-the-asp-net-mvc-1-0-release-candidate","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/whats-new-for-mvc-tools-in-the-asp-net-mvc-1-0-release-candidate\/","title":{"rendered":"What\u2019s New For MVC Tools in the ASP.NET MVC 1.0 Release Candidate"},"content":{"rendered":"<p><P>The ASP.NET MVC 1.0 Release Candidate (RC) is finally out, and we wanted to give returning MVC users as well as new MVC users an overview of what the tooling in Visual Studio provides.<\/P>\n<P>The MVC 1.0 RC can be downloaded right now <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=141184&amp;clcid=0x409\" target=\"_blank\" rel=\"noopener\">here<\/A> (<a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=137661&amp;clcid=0x409\" target=\"_blank\" rel=\"noopener\">Release Notes<\/A>).&nbsp; Please note that this release will work with both Visual Studio 2008 and <a href=\"http:\/\/www.microsoft.com\/express\/vwd\/\" target=\"_blank\" rel=\"noopener\">Visual Web Developer Express 2008 SP1<\/A> (free download).<\/P>\n<P>In case you missed it, be sure to also read ScottGu\u2019s blog post on the RC for some great information (including runtime changes!): <a title=\"http:\/\/weblogs.asp.net\/scottgu\/archive\/2009\/01\/27\/asp-net-mvc-1-0-release-candidate-now-available.aspx\" href=\"http:\/\/weblogs.asp.net\/scottgu\/archive\/2009\/01\/27\/asp-net-mvc-1-0-release-candidate-now-available.aspx\" target=\"_blank\" rel=\"noopener\">http:\/\/weblogs.asp.net\/scottgu\/archive\/2009\/01\/27\/asp-net-mvc-1-0-release-candidate-now-available.aspx<\/A><\/P>\n<H4>Project Templates<\/H4>\n<P>The MVC installer provides project templates for use in Visual Studio.&nbsp; If you visit the new project dialog (File \u2013&gt; New \u2013&gt; Project) you will see under the \u2018Web\u2019 section, an option labeled \u2018ASP.NET MVC Web Application\u2019.&nbsp; This will create a web application project that includes appropriate references to various assemblies (such as System.Web.Mvc) as well as a default set of controllers and views to get you started.<\/P>\n<P>&nbsp;<A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/NewProjectDialog_2.jpg\"><IMG title=\"NewProjectDialog\" height=\"433\" alt=\"NewProjectDialog\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/NewProjectDialog_thumb.jpg\" width=\"644\" border=\"0\"><\/A> <\/P>\n<P>When you create a new project you also will see a dialog that lets you create a new Test project to go along with your new web application.&nbsp; This test project can be used to create a suite of tests for your web application, or guide your development if you are following the test-driven-development model.&nbsp; This dialog will also surface third-party testing frameworks such as NUnit, in addition to the default Visual Studio Test Project option.&nbsp; Check out the following previous blog posts for more information on the test framework integration:<\/P>\n<P>Test Framework Integration: <a title=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/02\/18\/asp-net-mvc-test-framework-integration.aspx\" href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/02\/18\/asp-net-mvc-test-framework-integration.aspx\" target=\"_blank\" rel=\"noopener\">http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/02\/18\/asp-net-mvc-test-framework-integration.aspx<\/A><\/P>\n<P>Test Framework Integration Walkthrough: <a title=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/03\/06\/asp-net-mvc-test-framework-integration-demo.aspx\" href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/03\/06\/asp-net-mvc-test-framework-integration-demo.aspx\" target=\"_blank\" rel=\"noopener\">http:\/\/blogs.msdn.com\/webdevtools\/archive\/2008\/03\/06\/asp-net-mvc-test-framework-integration-demo.aspx<\/A><\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/NewProjectUnitTestOptions_2.jpg\"><IMG title=\"NewProjectUnitTestOptions\" height=\"376\" alt=\"NewProjectUnitTestOptions\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/NewProjectUnitTestOptions_thumb.jpg\" width=\"562\" border=\"0\"><\/A> <\/P>\n<H4>Add Controller<\/H4>\n<P>To make the process of adding a controller simpler, Visual Studio surfaces a few different ways for users to add a new controller to their MVC project.&nbsp; The first method is probably the most familiar to Visual Studio users \u2013 through the Add New Item dialog.&nbsp; Simply right-click any folder (or the top-level project node) in the Solution Explorer and go to Add \u2013&gt; New Item to invoke the dialog and navigate to the Web \u2013&gt; MVC node to view item templates available for MVC projects.&nbsp; The \u2018MVC Controller Class\u2019 template will add a basic controller class to the location you have chosen.<\/P>\n<P>&nbsp;<A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddNewItemController_2.jpg\"><IMG title=\"AddNewItemController\" height=\"387\" alt=\"AddNewItemController\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddNewItemController_thumb.jpg\" width=\"644\" border=\"0\"><\/A> <\/P>\n<P>You can also add a controller through the Add Controller dialog, which can be accessed by right-clicking the \u2018Controllers\u2019 folder (or a sub-folder under there) and choosing the \u2018Controller\u2026\u2019 option under the \u2018Add\u2019 sub-menu.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddControllerMenu_2.jpg\"><IMG title=\"AddControllerMenu\" height=\"405\" alt=\"AddControllerMenu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddControllerMenu_thumb.jpg\" width=\"451\" border=\"0\"><\/A> <\/P>\n<P>This will bring up a simple dialog box where you can type in the name of the controller you want to use.&nbsp; There is also a checkbox to add additional Action Methods named Details, Create, and Edit, to speed up controller authoring for common database-oriented situations.&nbsp; The Add Controller dialog is also accessible using keyboard shortcut Ctrl-M Ctrl-C.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddControllerDialog_2.jpg\"><IMG title=\"AddControllerDialog\" height=\"177\" alt=\"AddControllerDialog\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddControllerDialog_thumb.jpg\" width=\"404\" border=\"0\"><\/A> <\/P>\n<P>Hit Add and a new Controller class will be added to the project.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddControllerDialogEditor_2.jpg\"><IMG title=\"AddControllerDialogEditor\" height=\"409\" alt=\"AddControllerDialogEditor\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddControllerDialogEditor_thumb.jpg\" width=\"441\" border=\"0\"><\/A> <\/P>\n<P>The contents of the controllers generated using the Add New Item dialog or the Add Controller dialog all come from a template located under the Visual Studio install directory (under the install directory, navigate to Common7\\IDE\\ItemTemplates\\[CSharp | VisualBasic]\\Web\\MVC\\CodeTemplates\\AddController\\).<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/ControllerT4Location_2.jpg\"><IMG title=\"ControllerT4Location\" height=\"119\" alt=\"ControllerT4Location\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/ControllerT4Location_thumb.jpg\" width=\"1028\" border=\"0\"><\/A> <\/P>\n<P>This template is a T4 (.tt) file that uses the same T4 technology Scott Hanselman <a href=\"http:\/\/www.hanselman.com\/blog\/T4TextTemplateTransformationToolkitCodeGenerationBestKeptVisualStudioSecret.aspx\" target=\"_blank\" rel=\"noopener\">recently blogged<\/A> about.&nbsp; You can edit this template in your favorite editor to customize the code that is generated by our tools (<EM>Note: we will be talking more about T4 templating in a follow-up post soon<\/EM>).<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/ControllerT4File_2.jpg\"><IMG title=\"ControllerT4File\" height=\"433\" alt=\"ControllerT4File\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/ControllerT4File_thumb.jpg\" width=\"516\" border=\"0\"><\/A> <\/P>\n<P>If you want to customize the code-generation on a per-project basis, you can copy the \u2018CodeTemplates\u2019 folder into your project and edit the .tt file within your project.&nbsp; Our tools will automatically pick up on this and respect the precedence of the template in your project over the global template.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/TemplateOverrideFolder_2.jpg\"><IMG title=\"TemplateOverrideFolder\" height=\"257\" alt=\"TemplateOverrideFolder\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/TemplateOverrideFolder_thumb.jpg\" width=\"206\" border=\"0\"><\/A> <\/P>\n<P><EM>Note: Adding a .tt file to a project in Visual Studio automatically sets the Custom Tool for the file to be \u2018TextTemplatingFileGenerator\u2019 \u2013 a convenience feature that allows a user to have .tt files in their project to do one-off code generation.&nbsp; However, our T4 templates are made to work only with our tooling and hence running them will generate errors.&nbsp; We suggest you hit \u2018Cancel\u2019 if asked permission to run the T4 file generator when you copy the \u2018CodeTemplates\u2019 folder into your project.&nbsp; You should also clear out the \u2018Custom Tool\u2019 property on any T4 templates relating to Add Controller or Add View to prevent changes to the template from triggering the default T4 file generator.<\/EM><\/P>\n<H4>Add View<\/H4>\n<P>An MVC application of course needs Views to go with the Controllers, and to make that process a little easier we provide a few different ways for a user to quickly add a view.&nbsp; The first method is to go through the Add New Item dialog as with Add Controller above.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddNewItemView_2.jpg\"><IMG title=\"AddNewItemView\" height=\"389\" alt=\"AddNewItemView\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddNewItemView_thumb.jpg\" width=\"644\" border=\"0\"><\/A> <\/P>\n<P>There are four options provided through this dialog relevant to Views:<\/P>\n<OL>\n<LI>MVC View Master Page \u2013 adds a master page that inherits from \u2018System.Web.Mvc.ViewMasterPage\u2019 so as to provide master and content page style organization with MVC applications <\/LI>\n<LI>MVC View Content Page \u2013 adds a view that references a master page and contains appropriate asp:Content tags to go along with the content placeholder\u2019s in the master page.&nbsp; Derives from \u2018System.Web.Mvc.ViewPage\u2019 <BR><BR><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddNewItemViewMasterSelection_2.jpg\"><IMG title=\"AddNewItemViewMasterSelection\" height=\"391\" alt=\"AddNewItemViewMasterSelection\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddNewItemViewMasterSelection_thumb.jpg\" width=\"644\" border=\"0\"><\/A> <BR><\/LI>\n<LI>MVC View Page \u2013 this adds a regular MVC view that derives from \u2018System.Web.Mvc.ViewPage\u2019 <\/LI>\n<LI>MVC View User Control \u2013 adds a partial view, which derives from \u2018System.Web.Mvc.ViewUserControler\u2019 <\/LI><\/OL>\n<P>You can also right-click the \u2018Views\u2019 folder (or a sub-folder thereof) and click on \u2018View\u2026\u2019 option under the \u2018Add\u2019 sub-menu to bring up the Add View dialog.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewMenu_2.jpg\"><IMG title=\"AddViewMenu\" height=\"294\" alt=\"AddViewMenu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewMenu_thumb.jpg\" width=\"455\" border=\"0\"><\/A> <\/P>\n<P>This dialog is a powerful code-generation tool that lets you add any type of view that you can add through the Add New Item dialog, along with a couple extras (explained below).<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialog_2.jpg\"><IMG title=\"AddViewDialog\" height=\"388\" alt=\"AddViewDialog\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialog_thumb.jpg\" width=\"360\" border=\"0\"><\/A> <\/P>\n<P>One of the more intuitive ways to access this dialog is from within an Action Method in a Controller class.&nbsp; Right-clicking anywhere within an Action Method brings up a context menu that has an extra option &#8211; \u2018Add View\u2019.&nbsp; This will bring up the Add View dialog and automatically name the view based on the name of the action method.&nbsp; You can also use the keyboard shortcut Ctrl-M Ctrl-V from within an Action Method in the editor to bring up the Add View Dialog.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewFromActionMethod_2.jpg\"><IMG title=\"AddViewFromActionMethod\" height=\"138\" alt=\"AddViewFromActionMethod\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewFromActionMethod_thumb.jpg\" width=\"433\" border=\"0\"><\/A> <\/P>\n<H5>Add View Dialog<\/H5>\n<P>As mentioned above, the Add View Dialog lets you create any type of view that you can add through the Add New Item dialog:<\/P>\n<OL>\n<LI>View User Control \u2013 simply check the first checkbox labeled \u2018Create a partial view\u2019 in the above dialog to create a view user control instead of a regular view page <\/LI>\n<LI>View Content Page \u2013 to create a content page, check the box labeled \u2018Select master page\u2019 and choose a master page.&nbsp; You can navigate to a master page by clicking the button labeled \u2018\u2026\u2019 to bring up the master page browser, or you can type a path in.&nbsp; The \u2018ContentPlaceHolder ID\u2019 textbox lets you specify which content placeholder from the master page the newly generate code should be placed into. <\/LI>\n<LI>View Page \u2013 to create a regular view page ensure that the \u2018Select master page\u2019 and \u2018Create a partial view\u2019 checkboxes are unchecked <\/LI><\/OL>\n<P>The Add View Dialog also provides a feature called Data Scaffolding.&nbsp; The basic idea around data scaffolding is that code-generation is performed based on some data to which a given view is tied.&nbsp; For example, a view tied to a table of Products should figure out what the columns in the Products table are and generate appropriate markup.<\/P>\n<P>To enable data-scaffolding for a view, check the checkbox labeled \u2018Create a strongly-typed view\u2019.&nbsp; This will enable the two drop-downs nested underneath the checkbox.&nbsp; The \u2018View data class\u2019 drop-down enumerates all the .NET types visible in your project and lets you choose one of them (<EM>NOTE: you must build your project for types to be visible through this drop-down<\/EM>).&nbsp; The generated view will inherit from System.Web.Mvc.ViewPage except that it will also provide the chosen type as a generic parameter in its inherits clause (see screenshot of generated code below).<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogDataClassDropDown_2.jpg\"><IMG title=\"AddViewDialogDataClassDropDown\" height=\"389\" alt=\"AddViewDialogDataClassDropDown\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogDataClassDropDown_thumb.jpg\" width=\"360\" border=\"0\"><\/A> <\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogGenericInherits_2.jpg\"><IMG title=\"AddViewDialogGenericInherits\" height=\"22\" alt=\"AddViewDialogGenericInherits\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogGenericInherits_thumb.jpg\" width=\"776\" border=\"0\"><\/A> <\/P>\n<P>The \u2018View content\u2019 drop-down lets you choose a template that will be used to perform code-generation.&nbsp; By default we provide five templates \u2013 Empty, Create, Details, Edit, and List.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogViewContentDropDown_2.jpg\"><IMG title=\"AddViewDialogViewContentDropDown\" height=\"387\" alt=\"AddViewDialogViewContentDropDown\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogViewContentDropDown_thumb.jpg\" width=\"360\" border=\"0\"><\/A> <\/P>\n<P>Different templates perform different forms of code-generation based on the data type specified.&nbsp; As an example, choosing the \u2018Create\u2019 option will produce the following code.&nbsp; Note that the template iterated properties on the data type that we chose and created an input form using those properties, as one might expect for data insertion.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogCreateEditor_4.jpg\"><IMG title=\"AddViewDialogCreateEditor\" height=\"405\" alt=\"AddViewDialogCreateEditor\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/AddViewDialogCreateEditor_thumb_1.jpg\" width=\"644\" border=\"0\"><\/A> <\/P>\n<P>The code-generation performed by the Add View Dialog all come from T4 (.tt) templates that are located under the Visual Studio sub-tree (under the install directory, navigate to Common7\\IDE\\ItemTemplates\\[CSharp | VisualBasic]\\Web\\MVC\\CodeTemplates\\AddView\\), like the Add Controller template.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/ViewT4Location_2.jpg\"><IMG title=\"ViewT4Location\" height=\"159\" alt=\"ViewT4Location\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/ViewT4Location_thumb.jpg\" width=\"1028\" border=\"0\"><\/A>&nbsp;<\/P>\n<P>These templates can be edited at their location here to get customized output, or you can copy the \u2018CodeTemplates\u2019 folder into your project\u2019s root to override the global templates and have project-specific code-generation.&nbsp; You can also add your own templates to either the global location or the templates override folder in your project and the Add View Dialog will automatically pick up on them and provide them as choices in the View Content drop-down.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/TemplateOverrideCustom_2.jpg\"><IMG title=\"TemplateOverrideCustom\" height=\"407\" alt=\"TemplateOverrideCustom\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/TemplateOverrideCustom_thumb.jpg\" width=\"631\" border=\"0\"><\/A>&nbsp;<\/P>\n<H4>Go to View \/ Go to Controller<\/H4>\n<P>The MVC tooling also provides two convenient code navigation features to quickly move between a view and a controller.&nbsp; From an Action Method within a Controller class, you can go to the matching view for that Action Method by right-clicking anywhere in the action method and choosing \u2018Go to View\u2026\u2019&nbsp; This will try to find a matching view for the given Action Method using the ASP.NET MVC convention of having a folder named \u2018Views\u2019 below which are folders for each Controller, below which are individual views.&nbsp; It uses the same logic as the runtime routing engine to find the view and open it in the editor\u2019s source view.&nbsp; You can also quickly navigate to a View from an Action Method using the keyboard shortcut Ctrl-M Ctrl-G.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/GoToViewMenu_2.jpg\"><IMG title=\"GoToViewMenu\" height=\"115\" alt=\"GoToViewMenu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/GoToViewMenu_thumb.jpg\" width=\"459\" border=\"0\"><\/A> <\/P>\n<P>Similarly, you can go from a view to a controller by right-clicking anywhere in <FONT color=\"#ff0000\">markup<\/FONT> in the editor and choosing \u2018Go to Controller\u2026\u2019 .&nbsp; This will look for a matching controller using the convention of naming Controller classes with names ending in \u2018Controller\u2019 and locating them under the \u2018Controllers\u2019 folder.&nbsp; You can also use the keyboard shortcut Ctrl-M Ctrl-G (same as Go to View) to navigate to the matching Controller.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/GoToControllerMenu_2.jpg\"><IMG title=\"GoToControllerMenu\" height=\"61\" alt=\"GoToControllerMenu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/GoToControllerMenu_thumb.jpg\" width=\"580\" border=\"0\"><\/A> <\/P>\n<H4>File Refactoring<\/H4>\n<P>Because MVC applications use routing, naming conventions are important to follow.&nbsp; To this end, in any MVC project, refactor-renames of Controllers and Action Methods will cause renames of appropriate folders and views.&nbsp; For example, renaming a controller class named \u2018HomeController\u2019 to \u2018MainController\u2019 would look for a folder named \u2018Home\u2019 under the \u2018Controllers\u2019 folder and rename it to \u2018Main\u2019.&nbsp; An undo of the refactor-rename action will undo the file refactoring as well.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/FileRefactoringController_2.jpg\"><IMG title=\"FileRefactoringController\" height=\"105\" alt=\"FileRefactoringController\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/FileRefactoringController_thumb.jpg\" width=\"518\" border=\"0\"><\/A> <\/P>\n<P>Similarly, renaming an action method named \u2018About\u2019 to \u2018ContactUs\u2019 will search for the matching view as per ASP.NET MVC conventions and rename the file appropriately.<\/P>\n<P><A href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/FileRefactoringActionMethod_2.jpg\"><IMG title=\"FileRefactoringActionMethod\" height=\"98\" alt=\"FileRefactoringActionMethod\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/FileRefactoringActionMethod_thumb.jpg\" width=\"457\" border=\"0\"><\/A> <\/P>\n<P><EM>Please note that only refactor-renames originating from the original definition of the Controller class or the Action Method will trigger file refactoring \u2013 doing so on a reference to a Controller class or Action Method will not.<\/EM><\/P>\n<H4>Summary<\/H4>\n<P>We hope that this post has given you an idea of how the MVC tooling provided in Visual Studio can guide you in bringing an MVC Application to life and increase your productivity.&nbsp; We look forward to any feedback you may have so PLEASE leave your comments and suggestions.&nbsp; Thanks for reading!<\/P>\n<P>Abhishek Mishra | Software Design Engineer | Visual Studio Web Developer<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The ASP.NET MVC 1.0 Release Candidate (RC) is finally out, and we wanted to give returning MVC users as well as new MVC users an overview of what the tooling in Visual Studio provides. The MVC 1.0 RC can be downloaded right now here (Release Notes).&nbsp; Please note that this release will work with both [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[4,31,7288,7262,7286,7287,147,7302,7316,7319,7267],"class_list":["post-3894","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-net","tag-asp-net","tag-asp-net-mvc-framework","tag-development","tag-mvc","tag-tdd","tag-visual-studio","tag-visual-studio-2008","tag-visual-studio-2008-sp1","tag-visual-web-developer","tag-vwd"],"acf":[],"blog_post_summary":"<p>The ASP.NET MVC 1.0 Release Candidate (RC) is finally out, and we wanted to give returning MVC users as well as new MVC users an overview of what the tooling in Visual Studio provides. The MVC 1.0 RC can be downloaded right now here (Release Notes).&nbsp; Please note that this release will work with both [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/3894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=3894"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/3894\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=3894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=3894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=3894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}