The specified solution configuration "Debug|BNB" is invalid

10,554

Solution 1

Background: At build-time the compiler (no matter if started from Expression Blend or Visual Studio) has to know what the target platform of your code, i.e. the system architecture like X86, 64bit etc.

The problem now is, that a system wide setting of an environment variable called "Platform" seems to override any setting of what Expression Blend uses as target platform, too.

I found some workarounds on other websites and will provide the possible solutions here. Trying one of the two suggestions should help:

  • Delete the conflicting environment variable "Platform" in "Control Panel -- System -- Advanced -- Environment Variables". Restart Blend and give it a try (maybe you have to restart your computer to make this work).
  • If this does not help: With the registry editor (Start -- Run -- "Regedit.exe") go to key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and selected the key Platform. Delete the value BNB. If you do not find the specified key, try repacing "CurrentControlSet" with "ControlSet001", this worked for in one case, too. Then restart your computer.

Please give a comment which of the solutions worked.

Solution 2

I just removed the Platform from Environment variables and it worked.

Share:
10,554
404Dreamer_ML
Author by

404Dreamer_ML

Interested in Mobile Dev, Cloud Computing, Data mining, Learning Machines and Neural Network. Interested in Business Intelligence and Knowledge Management Processes. Still Student.

Updated on June 25, 2022

Comments

  • 404Dreamer_ML
    404Dreamer_ML about 2 years

    In Expression Blend 4, while compiling I get an error saying

    The specified solution configuration “Debug|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.
    Done building project “myproject.sln” — FAILED.
    Build failed.

  • David McClelland
    David McClelland almost 13 years
    I was following Scott Hanselman's MSBuild tutorial (hanselman.com/blog/…) and got the same error message. Deleting the environment variable (and rebooting) fixed it for me.
  • theisenp
    theisenp about 12 years
    Deleting the "Platform" Environment Variable and then rebooting solved the problem for me. Apparently the variable is set to "BNB" by HP Easy Setup stackoverflow.com/questions/2507856/…
  • Justin
    Justin almost 12 years
    THANK YOU!! This was driving me insane, I had some legacy code that was being built with command line tools and my HP laptop has the registry setting. Deleting it and rebooting solved my problem. I was able to fix a very obscure error.
  • workabyte
    workabyte almost 10 years
    We did option 2: removed the value for Platform and reboot. This worked for us and thank you!
  • Robert Kerr
    Robert Kerr over 9 years
    Platform was being set, but not the above two methods, and I couldn't find it anywhere else, so I added a SET PLATFORM= to my batch file to clear the X64 value, and the problem went away.
  • a''
    a'' about 9 years
    Command prompt restart is required after this - just to let y'all know
  • Yaser Har
    Yaser Har over 7 years
    Thanks HP for yet another thing you've screwed up on my machine. And thanks @theisenp for helping me find out who to blame. :)