{"id":5254,"date":"2006-11-27T14:41:00","date_gmt":"2006-11-27T14:41:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2006\/11\/27\/part-3-of-3-creating-sub-projects-using-the-visual-studio-development-server-and-web-application-projects\/"},"modified":"2006-11-27T14:41:00","modified_gmt":"2006-11-27T14:41:00","slug":"part-3-of-3-creating-sub-projects-using-the-visual-studio-development-server-and-web-application-projects","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/part-3-of-3-creating-sub-projects-using-the-visual-studio-development-server-and-web-application-projects\/","title":{"rendered":"Part 3 of 3: Creating sub-projects using the Visual Studio Development Server and Web Application Projects"},"content":{"rendered":"<p>This is the\u00a0Part 3 of a 3 part\u00a0series on using\u00a0sub-projects with the Web Application Projects add-in\u00a0for Visual Studio 2005.<\/p>\n<p>Part 1\u00a0of the series can be found <a href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2006\/07\/01\/652986.aspx\">here<\/a>.\nPart 2 of the series can be found <a class=\"\" href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2006\/08\/15\/701642.aspx\">here<\/a>.<\/p>\n<p>This post covers\u00a0the final\u00a0concept I wanted to share\u00a0when using sub-projects with the Web Application Projects add-in, that is using a sub-project structure without using IIS, but instead with the built-in Visual Studio Development Server.<\/p>\n<p><span style=\"font-size: x-large\">Prerequisite<\/span><\/p>\n<ul>\n<li>Visual Studio 2005 with <a href=\"http:\/\/g.msn.com\/9SE\/1?http:\/\/msdn.microsoft.com\/asp.net\/reference\/infrastructure\/wap\/default.aspx&amp;&amp;DI=6244&amp;IG=96cf4f0cef7744eaa8801eb0e9d345a4&amp;POS=1&amp;CM=WPU&amp;CE=1&amp;CS=OTH&amp;SR=1\">Web Application Projects add-in<\/a> installed<\/li>\n<li>This article\u00a0assumes\u00a0the user\u00a0has already\u00a0walked through\u00a0<a href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2006\/07\/01\/652986.aspx\">Part 1<\/a>\u00a0and <a class=\"\" href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2006\/08\/15\/701642.aspx\">Part 2<\/a> of this series.\u00a0\u00a0 <strong><span style=\"color: #ff0000\">NOTE: It is very important to have done these prerequisite\u00a0steps as the example below\u00a0will not make sense without the context of those two articles.<\/span><\/strong><\/li>\n<\/ul>\n<p><span style=\"font-size: x-large\">Setting up the Root Project<\/span><\/p>\n<p>To\u00a0create the root project\u00a0follow the instructions as they are described in <a class=\"\" href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2006\/07\/01\/652986.aspx\">Part 1<\/a> of this series.\u00a0 The primary difference when using the Visual Studio Development Server is to set the project properties of the\u00a0root project to not use IIS and to use a\u00a0specific port with the Visual Studio Development Server as shown in the diagram below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2006\/11\/subproj3-2.jpg\" alt=\"\" width=\"789\" height=\"734\" class=\"alignnone size-full wp-image-21460\" srcset=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2006\/11\/subproj3-2.jpg 789w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2006\/11\/subproj3-2-300x279.jpg 300w, https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2006\/11\/subproj3-2-768x714.jpg 768w\" sizes=\"(max-width: 789px) 100vw, 789px\" \/><\/p>\n<p><span style=\"font-size: x-large\">Setting up the Sub-Project<\/span><\/p>\n<p>Once again, creating and setting up the sub-project is done the same as described in <a class=\"\" href=\"http:\/\/blogs.msdn.com\/webdevtools\/archive\/2006\/07\/01\/652986.aspx\">Part 1<\/a> of this series, the primary difference being the\u00a0settings in the &#8220;Web&#8221; tab of the\u00a0project properties for the sub-project.\u00a0 For the sub-project, on the &#8220;Web&#8221; tab of its project properties, leave the setting to &#8220;Use IIS Web Server&#8221; (somewhat ironic as in this case it will actually use the Visual Studio Development Server).\u00a0\u00a0Also, set\u00a0the Project URL value to: <a href=\"http:\/\/localhost:[port]\/[subprojectfolder\">http:\/\/localhost:[port]\/[subprojectfolder<\/a>], where [port] is the Specific Port you selected for the Visual Studio Development server on the Root project, in this case &#8220;8080&#8221;, and [subprojectfolder] is the name of the sub-folder where the sub-project is located inside the root project, in this case &#8220;SubProject1&#8221;.<\/p>\n<p><strong>NOTE: This post only describes the differences in setting up a sub-project&#8217;s settings when using the Visual Studio Development Server.\u00a0\u00a0You will\u00a0still needs to perform all the the other steps described in <\/strong><a href=\"TINYMCE_UNIQUEURL();\"><strong>Part 1<\/strong><\/a><strong> of this\u00a0series to\u00a0configure the sub-project\u00a0property (e.g. &#8211;\u00a0deleting the web.config in sub-project, setting correct output path in sub-project, setting a project reference to root project in sub-project).<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/subproj3-6.png\" border=\"0\" \/><\/p>\n<p><span style=\"font-size: x-large\">Running pages in the Sub-Project<\/span><\/p>\n<p>The final aspect that is different about this configuration from using IIS is how pages in the sub-project are run.\u00a0 The difference is that the Visual Studio Development Server from the root project must be running in order to serve up pages from the sub-project.\u00a0 Thus the first thing one should do is select the page in the root project and run it to make sure the Visual Studio development server is loaded.\u00a0 Once a page in the root project is run, you should be able to run pages from the sub-project with success.<\/p>\n<p><span style=\"font-size: x-large\">Summary<\/span><\/p>\n<p>This post finalizes my series on using Web Application projects to partition a single ASP.NET application into several Visual Studio projects.\u00a0 If you cannot use IIS in your development environment, the technique described here will still enable you to take advantage of using a sub-project structure at development time.<\/p>\n<p>As always, looking forward to hearing feedback from users trying this out!<\/p>\n<p>&#8211;Omar<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the\u00a0Part 3 of a 3 part\u00a0series on using\u00a0sub-projects with the Web Application Projects add-in\u00a0for Visual Studio 2005. Part 1\u00a0of the series can be found here. Part 2 of the series can be found here. This post covers\u00a0the final\u00a0concept I wanted to share\u00a0when using sub-projects with the Web Application Projects add-in, that is using [&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,147,7267,7264,7268],"class_list":["post-5254","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-net","tag-asp-net","tag-visual-studio","tag-vwd","tag-wap","tag-web"],"acf":[],"blog_post_summary":"<p>This is the\u00a0Part 3 of a 3 part\u00a0series on using\u00a0sub-projects with the Web Application Projects add-in\u00a0for Visual Studio 2005. Part 1\u00a0of the series can be found here. Part 2 of the series can be found here. This post covers\u00a0the final\u00a0concept I wanted to share\u00a0when using sub-projects with the Web Application Projects add-in, that is using [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/5254","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=5254"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/5254\/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=5254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=5254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=5254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}