<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>VS Code keeps selecting wrong build configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128582/vs-code-keeps-selecting-wrong-build-configuration</link><description>Using the nRF Connect extension(s) for VS Code. Our project has multiple build configurations for multiple different hardware designs, including multiple variants of nRF52 microcontrollers. I am able to build each configuration successfully, but no matter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Jun 2026 19:08:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128582/vs-code-keeps-selecting-wrong-build-configuration" /><item><title>RE: VS Code keeps selecting wrong build configuration</title><link>https://devzone.nordicsemi.com/thread/568619?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2026 19:08:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12d0f721-501b-44ec-8c6a-bb30e1845d04</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;If your project can run as expected, only the editor loaded the wrong file. Then, please ensure you select the correct app build folder to load the correct files every time, and open the files from the Details View. You can also open .config from the Output files to verify the config values.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2026_2D00_06_2D00_30-141115.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code keeps selecting wrong build configuration</title><link>https://devzone.nordicsemi.com/thread/568614?ContentTypeID=1</link><pubDate>Tue, 30 Jun 2026 14:50:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3a65643-2a48-46cc-aeec-670f663f534f</guid><dc:creator>Will_20241202</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;I have the correct build targets showing up in the locations highlighted in your screen shot, but the editors still show the incorrect code paths as active. To be clear, the code builds and runs correctly, with the execution following the desired path, it&amp;#39;s just really hard to trace through the code in the editors because the compile guards are drawing the values from a different build target. A toy example is shown below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if defined( CONFIG_BOARD_FOO_A )
	#define MY_CONSTANT (123)
#elif defined( CONFIG_BOARD_FOO_B )
	#define MY_CONSTANT (456)
#elif defined( CONFIG_BOARD_FOO_C )
	#define MY_CONSTANT (789)
#else
	#error &amp;quot;No recognized board defined!&amp;quot;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If I build against the target that uses BOARD_FOO_C I would expect the MY_CONSTANT to be shown as (789) and the line defining it as not dimmed out, but instead I see the line where it is defined as (123) as normal and the others are dimmed. As the defines propagate through the editors this results in the &amp;quot;Go To Definition&amp;quot; and &amp;quot;Go To Declaration&amp;quot; features picking the wrong code and hovering over expressions to see how they evaluate showing the wrong values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code keeps selecting wrong build configuration</title><link>https://devzone.nordicsemi.com/thread/568571?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2026 19:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f893e757-5a49-4960-928a-0d0fa1215eca</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Will,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try selecting the app entry under the&amp;nbsp;&lt;span&gt;build configuration entry as the following figure:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2026_2D00_06_2D00_29-142324.png" /&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>