{"id":3463,"date":"2006-09-13T00:04:44","date_gmt":"2006-09-13T00:04:44","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2006\/09\/13\/getting-web-sites-precompiled-with-team-build\/"},"modified":"2006-09-13T00:04:44","modified_gmt":"2006-09-13T00:04:44","slug":"getting-web-sites-precompiled-with-team-build","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/getting-web-sites-precompiled-with-team-build\/","title":{"rendered":"Getting web sites precompiled with Team Build"},"content":{"rendered":"<p><a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\">Aaron Hallberg<\/a> wrote a great post explaining how to&nbsp;build precompiled web sites with Team Build.&nbsp; The problem is that building them does not, by default, produce precompiled websites where all of the code is in dlls and removed from the ASP.NET source files.<\/p>\n<blockquote>\n<p><a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\/archive\/2006\/09\/12\/750590.aspx\">Team Build and aspnet_compiler.exe<\/a><\/p>\n<p>&#8230;<\/p>\n<p>Because Team Build typically compiles <em>solutions<\/em> and not <em>projects<\/em>, an additional complication is introduced with website projects.&nbsp; By default, these projects have the <strong>-u<\/strong> option selected for their compilation in their <em>solution<\/em> property pages.&nbsp;<\/p>\n<p>With this option turned on, aspnet_compiler.exe keeps markup, including inline code, in all *.aspx and *.ashx files (and possibly others &#8211; I&#8217;m no expert in these matters) so that they can be modified after the site is deployed.&nbsp; So &#8211; if you compile your website projects by using MSBuild to compile the <em>solutions<\/em> that contain them:<\/p>\n<p>&gt; msbuild.exe C:MyProjectsWebApplication.sln <\/p>\n<p>&#8230;your *.aspx and *.ashx files will be <em>updatable<\/em> and will not be compiled.&nbsp; Since Team Build typically compiles <em>solutions<\/em>, builds done through Team Build will run into the same issue. <\/p>\n<p><a href=\"http:\/\/blogs.msdn.com\/aaronhallberg\/archive\/2006\/09\/12\/750590.aspx\">more, including the solution&#8230;<\/a><\/p>\n<\/blockquote>\n<p>tags: <a href=\"http:\/\/technorati.com\/tag\/tfs\" rel=\"tag\">tfs<\/a>, <a href=\"http:\/\/technorati.com\/tag\/team+foundation+server\" rel=\"tag\">team foundation server<\/a>, <a href=\"http:\/\/technorati.com\/tag\/team+build\" rel=\"tag\">team build<\/a><\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aaron Hallberg wrote a great post explaining how to&nbsp;build precompiled web sites with Team Build.&nbsp; The problem is that building them does not, by default, produce precompiled websites where all of the code is in dlls and removed from the ASP.NET source files. Team Build and aspnet_compiler.exe &#8230; Because Team Build typically compiles solutions and [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[7,8],"class_list":["post-3463","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-team-build","tag-team-foundation"],"acf":[],"blog_post_summary":"<p>Aaron Hallberg wrote a great post explaining how to&nbsp;build precompiled web sites with Team Build.&nbsp; The problem is that building them does not, by default, produce precompiled websites where all of the code is in dlls and removed from the ASP.NET source files. Team Build and aspnet_compiler.exe &#8230; Because Team Build typically compiles solutions and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/3463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=3463"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/3463\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=3463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=3463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=3463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}