Release|BNB error when trying to build

It’s been a while since my last post; I had several major lifestyle changes a few months back, not least starting a family, so my priorities have been elsewhere. Anyway, hopefully I can get the post frequency up a bit now.

The other day I encountered an odd issue when trying to build a solution. I was getting the error:

MSB4126: The specified solution configuration “Release|BNB” is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform=”Any CPU”) or leave those properties blank to use the default solution configuration.

I had no idea what BNB was and where it had come from – it seemed like the build engine was picking it up as the platform somehow. But there was no reference to it anywhere in the solution, nor in the build script. I recalled having seen this on another project a while back; I can’t remember the exact circumstances, I worked round it somehow in the end, but it suggested that it wasn’t something specific to this solution.

I was baffled by this for a while and was struggling to find any clues on Google, until eventually I discovered that my laptop had come with an environment variable of “Platform” defined with a value of, you guessed it, “BNB”. Turns out that this was getting picked up by the build script and being set as the Platform property, so instead of it being blank as the error message suggested, it was resulting in a non-sensical solution configuration.

Further digging revealed that this environment variable is specific to certain HP machines and the software they typically ship with, so not too widespread which is why it turned out to be difficult to search for.

The simple solution was to just delete the environment variable; the build ran fine afterwards. Got no idea what purpose it served but the machine hasn’t thrown any wobblies since 🙂

This entry was posted in Fixes, Visual Studio and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

9 Comments


  1. Fatal error: Uncaught Error: Call to undefined function ereg() in /var/www/html/wp-content/themes/thematic/library/extensions/comments-extensions.php:262 Stack trace: #0 /var/www/html/wp-content/themes/thematic/library/extensions/discussion.php(30): thematic_commenter_link() #1 /var/www/html/wp-includes/class-walker-comment.php(180): thematic_comments(Object(WP_Comment), Array, 1) #2 /var/www/html/wp-includes/class-wp-walker.php(146): Walker_Comment->start_el('', Object(WP_Comment), 1, Array) #3 /var/www/html/wp-includes/class-walker-comment.php(140): Walker->display_element(Object(WP_Comment), Array, '5', 0, Array, '') #4 /var/www/html/wp-includes/class-wp-walker.php(371): Walker_Comment->display_element(Object(WP_Comment), Array, '5', 0, Array, '') #5 /var/www/html/wp-includes/comment-template.php(2040): Walker->paged_walk(Array, '5', 0, 0, Array) #6 /var/www/html/wp-content/themes/thematic/comments.php(80): wp_list_comments('type=comment&ca...') #7 /var/www/html/wp-includes/comment-template.php(1430): require('/var/www in /var/www/html/wp-content/themes/thematic/library/extensions/comments-extensions.php on line 262