{"id":2379,"date":"2015-07-06T08:00:00","date_gmt":"2015-07-06T07:00:00","guid":{"rendered":"http:\/\/www.diogonunes.com\/blog\/?p=2379"},"modified":"2020-05-15T14:23:49","modified_gmt":"2020-05-15T13:23:49","slug":"custom-build-configurations-visualstudio","status":"publish","type":"post","link":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/","title":{"rendered":"Custom build configurations on VisualStudio"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?resize=580%2C220\" alt=\"conditional build\" width=\"580\" height=\"220\" class=\"aligncenter size-full wp-image-2402\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?w=1103&amp;ssl=1 1103w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?resize=400%2C152&amp;ssl=1 400w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?resize=1024%2C388&amp;ssl=1 1024w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/p>\n<p><!--more--><\/p>\n<p>Sometimes you might need your application to behave differently according to different clients, or different operating systems, or any other criterion. You could create global variables, initialize them on your application&#8217;s startup, and scatter <code>if<\/code> statements over your code. What you should do is use the &#8220;State&#8221; design pattern instead, but for little and localized differences that might be overkill.<\/p>\n<p>The lean solution is to use VisualStudio&#8217;s build configurations. They offer more flexibility, improve code readability, and ease debugging. Under the hood VisualStudio also uses state variables and if statements, however it abstracts most of those implementation details from the developer.<\/p>\n<h3>What you&#8217;ll get<\/h3>\n<p><a href=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-1.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-1.png?resize=436%2C193\" alt=\"BuildConfigurations-1\" width=\"436\" height=\"193\" class=\"aligncenter size-full wp-image-2384\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-1.png?w=436&amp;ssl=1 436w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-1.png?resize=400%2C177&amp;ssl=1 400w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/a><\/p>\n<p>In a nutshell, you will:<\/p>\n<ol>\n<li>Define your custom build configuration (e.g. <code>Client_JohnDoe<\/code>, <code>Platform_Android<\/code>)<\/li>\n<li>Tell the compiler when to use that build configuration, using the <code>#IF<\/code> directive.<\/li>\n<\/ol>\n<p>Your final code will look like this:<\/p>\n<pre><code>#if   RELEASE_CLIENT_ABC\n    bool _isDebug = false;\n    Organization _currentOrg = new ClientABC();\n#elif RELEASE_CLIENT_XYZ\n    bool _isDebug = false;\n    Organization _currentOrg = new ClientXYZ();\n#elif RELEASE\n    bool _isDebug = false;\n    Organization _currentOrg = new DevTest();\n#else\n    bool _isDebug = true;\n    Organization _currentOrg = new DevTest();\n#endif\n<\/code><\/pre>\n<h3>Tutorial<\/h3>\n<p>You can view and select build configurations from VisualStudio&#8217;s top toolbar. Every C# project comes with a <code>Debug<\/code> and a <code>Release<\/code> configuration. When you select one you&#8217;re telling the IDE to compile differently and behave accordingly. Let&#8217;s create your first custom build configuration.<\/p>\n<p>Imagine this scenario: you have two clients (ABC and XYZ) and you want your software to behave differently for each one. Therefore, besides <code>Debug<\/code> and <code>Release<\/code> you need two additional configurations: <code>Release ABC<\/code> and <code>Release XYZ<\/code>. Since these last two build configurations are production-ready, you will copy the settings from <code>Release<\/code>.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-2.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-2.png?resize=580%2C363\" alt=\"BuildConfigurations-2\" width=\"580\" height=\"363\" class=\"aligncenter size-full wp-image-2385\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-2.png?w=717&amp;ssl=1 717w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-2.png?resize=400%2C250&amp;ssl=1 400w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Now go to your project&#8217;s <strong>Properties<\/strong> and select the <strong>Build<\/strong> tab. Select your newly created setting <code>Release ABC<\/code> from the <strong>Configuration<\/strong> combo box. Configure it as your wish, making sure you define a <strong>Conditional compilation symbol<\/strong>. My convention is to use the configuration name in upper case, like <code>RELEASE_ABC<\/code>. I also advise you to specify a different <strong>Output path<\/strong> &#8212; that way, the next time you build your project, each client&#8217;s binaries will be automatically placed into different folders.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-3.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-3.png?resize=580%2C447\" alt=\"BuildConfigurations-3\" width=\"580\" height=\"447\" class=\"aligncenter size-full wp-image-2405\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-3.png?w=769&amp;ssl=1 769w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-3.png?resize=400%2C308&amp;ssl=1 400w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>Save your changes and you&#8217;re ready to use it on your code. The conditional compilation syntax is <code>#IF &lt;CondCompilationSymbol&gt;<\/code>, <code>#ELIF &lt;CondCompilationSymbol&gt;<\/code>, <code>#ELSE<\/code>, and <code>#ENDIF<\/code>.<\/p>\n<p>Do you want some code to run <em>only<\/em> during <code>Debug<\/code>?<\/p>\n<pre><code>#if DEBUG\n    &lt;this code is executed only when in Debug&gt;\n#endif\n<\/code><\/pre>\n<p>Great, but you want something else to happen otherwise:<\/p>\n<pre><code>#if DEBUG\n    &lt;this code is executed only when in Debug&gt;\n#else\n    &lt;this is executed on all other configurations&gt;\n#endif\n<\/code><\/pre>\n<p>Finally, an example showing that you can do anything inside those if statements:<\/p>\n<pre><code>#if RELEASE_ABC\n    labelCompanyName.Text = \"ABC is the best\";\n    OpenOfficialWebsite();\n#elif RELEASE_XYZ\n    labelCompanyName.Text = \"XYZ clearly rules\";\n    PlayVictorySound();\n#elif RELEASE\n    labelCompanyName.Text = \"(default company)\";\n    ShowCreateCompanyForm();\n#elif DEBUG\n    labelCompanyName.Text = \"(debug)\";\n#else\n    labelCompanyName.Text = \"(unknown build config)\";\n#endif\n<\/code><\/pre>\n<p>VisualStudio will <em>grey out<\/em> the lines of code which won&#8217;t be executed according to the current build configuration. That helps a lot during coding and debugging.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-4.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-4.png?resize=580%2C440\" alt=\"BuildConfigurations-4\" width=\"580\" height=\"440\" class=\"aligncenter size-full wp-image-2383\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-4.png?w=610&amp;ssl=1 610w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/BuildConfigurations-4.png?resize=400%2C304&amp;ssl=1 400w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>There you go. Now you can go clean that code ;)<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":2402,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[47,29,31],"class_list":["post-2379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-c-sharp","tag-coding","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Custom build configurations on VisualStudio - The Geeky Gecko<\/title>\n<meta name=\"description\" content=\"This tutorial explains how you can use VisualStudio&#039;s build configurations to compile differently for separate clients. Refactor your code using #if syntax.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom build configurations on VisualStudio - The Geeky Gecko\" \/>\n<meta property=\"og:description\" content=\"This tutorial explains how you can use VisualStudio&#039;s build configurations to compile differently for separate clients. Refactor your code using #if syntax.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\" \/>\n<meta property=\"og:site_name\" content=\"The Geeky Gecko\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-06T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-15T13:23:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1103\" \/>\n\t<meta property=\"og:image:height\" content=\"418\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Diogo Nunes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:site\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diogo Nunes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\"},\"author\":{\"name\":\"Diogo Nunes\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"headline\":\"Custom build configurations on VisualStudio\",\"datePublished\":\"2015-07-06T07:00:00+00:00\",\"dateModified\":\"2020-05-15T13:23:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\"},\"wordCount\":396,\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1\",\"keywords\":[\"c#\",\"coding\",\"tutorial\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\",\"name\":\"Custom build configurations on VisualStudio - The Geeky Gecko\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1\",\"datePublished\":\"2015-07-06T07:00:00+00:00\",\"dateModified\":\"2020-05-15T13:23:49+00:00\",\"description\":\"This tutorial explains how you can use VisualStudio's build configurations to compile differently for separate clients. Refactor your code using #if syntax.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1\",\"width\":1103,\"height\":418},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.diogonunes.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom build configurations on VisualStudio\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/\",\"name\":\"The Geeky Gecko\",\"description\":\"The Geeky Gecko\",\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\",\"name\":\"Diogo Nunes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"width\":799,\"height\":799,\"caption\":\"Diogo Nunes\"},\"logo\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.diogonunes.com\",\"https:\/\/x.com\/dialexnunes\"],\"url\":\"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom build configurations on VisualStudio - The Geeky Gecko","description":"This tutorial explains how you can use VisualStudio's build configurations to compile differently for separate clients. Refactor your code using #if syntax.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/","og_locale":"en_US","og_type":"article","og_title":"Custom build configurations on VisualStudio - The Geeky Gecko","og_description":"This tutorial explains how you can use VisualStudio's build configurations to compile differently for separate clients. Refactor your code using #if syntax.","og_url":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/","og_site_name":"The Geeky Gecko","article_published_time":"2015-07-06T07:00:00+00:00","article_modified_time":"2020-05-15T13:23:49+00:00","og_image":[{"width":1103,"height":418,"url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1","type":"image\/png"}],"author":"Diogo Nunes","twitter_card":"summary_large_image","twitter_creator":"@dialexnunes","twitter_site":"@dialexnunes","twitter_misc":{"Written by":"Diogo Nunes","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#article","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/"},"author":{"name":"Diogo Nunes","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"headline":"Custom build configurations on VisualStudio","datePublished":"2015-07-06T07:00:00+00:00","dateModified":"2020-05-15T13:23:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/"},"wordCount":396,"publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1","keywords":["c#","coding","tutorial"],"articleSection":["Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/","url":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/","name":"Custom build configurations on VisualStudio - The Geeky Gecko","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1","datePublished":"2015-07-06T07:00:00+00:00","dateModified":"2020-05-15T13:23:49+00:00","description":"This tutorial explains how you can use VisualStudio's build configurations to compile differently for separate clients. Refactor your code using #if syntax.","breadcrumb":{"@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#primaryimage","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1","width":1103,"height":418},{"@type":"BreadcrumbList","@id":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.diogonunes.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Custom build configurations on VisualStudio"}]},{"@type":"WebSite","@id":"https:\/\/www.diogonunes.com\/blog\/#website","url":"https:\/\/www.diogonunes.com\/blog\/","name":"The Geeky Gecko","description":"The Geeky Gecko","publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c","name":"Diogo Nunes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","width":799,"height":799,"caption":"Diogo Nunes"},"logo":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.diogonunes.com","https:\/\/x.com\/dialexnunes"],"url":"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1","jetpack-related-posts":[{"id":4307,"url":"https:\/\/www.diogonunes.com\/blog\/ama-e2e-tests\/","url_meta":{"origin":2379,"position":0},"title":"7 questions we all had about end-to-end tests","author":"Diogo Nunes","date":"4 October, 2021","format":false,"excerpt":"The summary of an Ask Me Anything session I hosted at my company \ud83c\udfc6 This post was featured in Software Testing Weekly, #92 and Software Testing Notes, #28 What\u2019s the definition of E2E in frontend? I don't think there's a definition specific to frontend (BE). An end-to-end test interacts with\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2021\/09\/Knowledge-Sharing-E2E-tests-1.jpg?fit=960%2C540&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2021\/09\/Knowledge-Sharing-E2E-tests-1.jpg?fit=960%2C540&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2021\/09\/Knowledge-Sharing-E2E-tests-1.jpg?fit=960%2C540&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2021\/09\/Knowledge-Sharing-E2E-tests-1.jpg?fit=960%2C540&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3692,"url":"https:\/\/www.diogonunes.com\/blog\/gitlab-pipeline-triggering-pipeline-sync\/","url_meta":{"origin":2379,"position":1},"title":"Pipeline triggering pipeline on GitLab","author":"Diogo Nunes","date":"25 May, 2020","format":false,"excerpt":"Usually when configuring a GitLab pipeline (.gitlab-ci.yml) you only care about steps in your own pipeline. Sometimes however, you may want to trigger other pipelines (of other repositories) as a step of your own pipeline. Context: You have your app divided into multiple microservices\/repos. There's another repo which contains a\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/s270904456481439361_p798_i2_w1799.jpeg?fit=1200%2C712&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/s270904456481439361_p798_i2_w1799.jpeg?fit=1200%2C712&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/s270904456481439361_p798_i2_w1799.jpeg?fit=1200%2C712&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/s270904456481439361_p798_i2_w1799.jpeg?fit=1200%2C712&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/s270904456481439361_p798_i2_w1799.jpeg?fit=1200%2C712&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2650,"url":"https:\/\/www.diogonunes.com\/blog\/browserstack-cross-browser-testing-review\/","url_meta":{"origin":2379,"position":2},"title":"Cross-browser testing with BrowserStack: a review","author":"Diogo Nunes","date":"15 August, 2016","format":false,"excerpt":"These are BrowserStack's main services or tools: Automate: Where you run your automated Selenium tests and check the results. Screenshots: Paste an URL, select the browsers and version you want, and in a few minutes you get a batch of screenshots. Live: by connecting to their data center you are\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"browserstack-logo","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/07\/browserstack-logo.png?fit=1024%2C337&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2047,"url":"https:\/\/www.diogonunes.com\/blog\/personality-test-to-build-better-teams\/","url_meta":{"origin":2379,"position":3},"title":"Personality test for better teams","author":"Diogo Nunes","date":"1 June, 2015","format":false,"excerpt":"It's not who you are, but how you fit in a team. While applying to a job position I once had to complete a personality test. I had done similar tests when I was younger. I even ventured to the world of Numerology. But this test was no bullsh!t. The\u2026","rel":"","context":"In &quot;Work&quot;","block_context":{"text":"Work","link":"https:\/\/www.diogonunes.com\/blog\/category\/work\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/ImitateFacialExpressions_122712-617x416.jpg?fit=617%2C416&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/ImitateFacialExpressions_122712-617x416.jpg?fit=617%2C416&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/ImitateFacialExpressions_122712-617x416.jpg?fit=617%2C416&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":2574,"url":"https:\/\/www.diogonunes.com\/blog\/how-to-use-browserstack-cross-browser-testing\/","url_meta":{"origin":2379,"position":4},"title":"Testing for cross-browser compatibility using BrowserStack","author":"Diogo Nunes","date":"12 September, 2016","format":false,"excerpt":"Learn how to do it with this example Recalling my BrowserStack review, their main tools are: Automate: Where you run your automated Selenium tests and check the results. Screenshots: Paste an URL, select the browsers and version you want, and in a few minutes you get a batch of screenshots.\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/6-Useful-Cross-Browser-Testing-Tools.png?fit=956%2C343&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":4756,"url":"https:\/\/www.diogonunes.com\/blog\/types-2-test-categories-approaches-types\/","url_meta":{"origin":2379,"position":5},"title":"Test categories and approaches (Types #2)","author":"Diogo Nunes","date":"16 October, 2023","format":false,"excerpt":"\ud83c\udfc6 This post was featured in Software Testing Weekly #191 This is a very long post. You don't have to read it all in one go. Use it as a reference, anytime you want to check the purpose of a particular test type. Categories Functional testing Non-functional testing Black box\u2026","rel":"","context":"In &quot;Work&quot;","block_context":{"text":"Work","link":"https:\/\/www.diogonunes.com\/blog\/category\/work\/"},"img":{"alt_text":"lego pieces","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/08\/xavi-cabrera-kn-UmDZQDjM-unsplash.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/08\/xavi-cabrera-kn-UmDZQDjM-unsplash.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/08\/xavi-cabrera-kn-UmDZQDjM-unsplash.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/08\/xavi-cabrera-kn-UmDZQDjM-unsplash.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/08\/xavi-cabrera-kn-UmDZQDjM-unsplash.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/2379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/comments?post=2379"}],"version-history":[{"count":1,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/2379\/revisions"}],"predecessor-version":[{"id":3801,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/2379\/revisions\/3801"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media\/2402"}],"wp:attachment":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media?parent=2379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/categories?post=2379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/tags?post=2379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}