{"id":40,"date":"2017-03-05T13:52:00","date_gmt":"2017-03-05T19:52:00","guid":{"rendered":"https:\/\/www.chrystalsander.com\/blog\/?p=40"},"modified":"2017-03-05T13:52:00","modified_gmt":"2017-03-05T19:52:00","slug":"net-customize-builds-per-environment","status":"publish","type":"post","link":"https:\/\/www.chrystalsander.com\/blog\/?p=40","title":{"rendered":".NET:  Customize Builds Per Environment"},"content":{"rendered":"<p>Two Options:<br \/>\n1. &nbsp;Web.Config Transformations<br \/>\n<span style=\"white-space: pre;\"> <\/span><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/dd465326.aspx\">https:\/\/msdn.microsoft.com\/en-us\/library\/dd465326.aspx<\/a><br \/>\n2. &nbsp;Deployment Parameters: &nbsp;Useful when you have to create a package without knowing some of the values that will be needed when the package is installed.<br \/>\n<span style=\"white-space: pre;\"> <\/span><a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/ff398068.aspx\">https:\/\/msdn.microsoft.com\/en-us\/library\/ff398068.aspx<\/a><br \/>\n<span style=\"white-space: pre;\"> <\/span><br \/>\nWeb.Config Transform:<br \/>\n1. Open Build &#8211;&gt; Configuration Manager<br \/>\n2. Create new &#8220;Active solution configuration&#8221; for each version you need and then close.<br \/>\n3. Navigate to Solution Explorer and right-click on your web.config and select &#8220;Add Config Transform.&#8221; &nbsp;This should generate the new config files you created in Configuration Manager.<br \/>\n4. Open the transform file for the build configuration that you want to work with.<\/p>\n<p>Further Reference:<br \/>\n<a href=\"https:\/\/code.msdn.microsoft.com\/ASPNET-Web-Deployment-c2d409f9\">https:\/\/code.msdn.microsoft.com\/ASPNET-Web-Deployment-c2d409f9<\/a><\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Two Options: 1. &nbsp;Web.Config Transformations https:\/\/msdn.microsoft.com\/en-us\/library\/dd465326.aspx 2. &nbsp;Deployment Parameters: &nbsp;Useful when you have to create a package without knowing some of the values that will be needed when the package is installed. https:\/\/msdn.microsoft.com\/en-us\/library\/ff398068.aspx Web.Config Transform: 1. Open Build &#8211;&gt; Configuration Manager 2. Create new &#8220;Active solution configuration&#8221; for each version you need and then close. &hellip; <a href=\"https:\/\/www.chrystalsander.com\/blog\/?p=40\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;.NET:  Customize Builds Per Environment&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,4,12,24,25],"tags":[],"_links":{"self":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/40"}],"collection":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=40"}],"version-history":[{"count":0,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chrystalsander.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}