locked
Getting error MSB4126 from Blend 4 RC RRS feed

  • Question

  • Hi,

    I have installed Blend 4 RC and VS 2010 Web Developer Express. I started a new project in Blend 4 to say Hello World from Silverlight.

    Building the project in Blend 4 I get the following error message:

    Build project: HelloWorldSilverlight4.sln, Targets: Rebuild
    __________________________________________________
    Project "C:\XYZ 4\SL 4 VB\HelloWorldSilverlight4\HelloWorldSilverlight4.sln" (Rebuild target(s)):

    C:\XYZ 4\SL 4 VB\HelloWorldSilverlight4\HelloWorldSilverlight4.sln.metaproj : error MSB4126: The specified solution configuration "Debug|HPD" 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 "HelloWorldSilverlight4.sln" -- FAILED.
    Build failed.

    How do I solve this?

    When I open the project in WV Web Developer 2010 Express and add some code the project is build correctly and it also runs correctly.

    I didn't get any error on install the new bits. My install order was:

    1) VS 2010 Visual Basic Express

    2) Web Platform installer

    3) VS 2010 Web Developer Express

    4) Silverlight 4 Tools for VS 2010

    5) MS Expression Blend 4 RC (during install Blend 4 RC I had to and did uninstall Blend 3 SDK Version 1.034.xxx - I am not sure which version it was)

    Update:

    Meanwhile I found two links about MSB4126 error message with Blend 4 BETA. But this is spanish and I installed Blend 4 RC. Here are those two links:

    http://geeks.ms/blogs/riacosta/archive/2010/04/08/error-al-compilar-con-blend-4-beta-debug-cmd-is-invalid.aspx

    http://www.eltatuajefalso.com/139/blend-problemas-al-compilar-en-el-september-preview 

     

    Regards,

    Martin

    Wednesday, April 21, 2010 8:00 AM

All replies

  • Hi,

    I solved the problem as follows.

    Using regedit.exe I navigated to th registry path

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

    and selected the key Platform. Platform had the value HPD.

    Then I deleted only the value HPD. After this the key Platform was still there but empty. I closed Regedit, restarted my PC and run Blend 4.

    The build for my HelloWorldSilverlight4 now succeded.

    Although I would like to know if there are any known issues concerning this workaround. What I found about MSB4126 on the internet was that this error occurs if the registry key "Platform" at the above mentioned registry path has any value. The value I guess comes from HP (Hewlett Packard). Maybe it stands for Hewlett Packard Device? The machine I use is a HP Pavilion. What I found on the internet mentioned was that also other PC manufacturer are writing a value to a registry key named Platform. And in those cases the error MSB4126 occured. I don't know whether on all machines with a value at registry key Platform but it seems to be a known issue.

    Regards,

    Martin

    Wednesday, April 21, 2010 10:20 AM
  •  

    Yes, this problem centers around Hewlett Packard machines.  I had this very same build issue on an HP Pavillion Elite HPE, and after I tweaked the registry as described I could build.

     

     

    Sunday, April 25, 2010 11:36 AM
  • I run into the same issue but in my case it was "error MSB4126: The specified solution configuration "Debug|BPC" is invalid." BPC not HPD, and without hacking registry, all I did was to remove an interfering environment variable named "PLATFORM" and restart Blend.
    Wednesday, December 1, 2010 2:50 PM
  • Hi Moadh,

    I also got the error massage: Debug|BPC while i tried to build my project.
    I wanted to ask you where did you removed the "PLATFORM" from?

    Thanks,
    keren

    Monday, December 20, 2010 8:46 AM
  • I had the same issue, by environment variable he means just that.  Dos Enviroment variable, as set via Control Panel > System > Advanced > Environment Variables.

    Just delete the Platform var.  What the hell is BNB platform anyway =)

    Cheers

    S

    • Proposed as answer by Simbosan Tuesday, April 5, 2011 10:16 PM
    • Unproposed as answer by Simbosan Tuesday, April 5, 2011 10:16 PM
    • Proposed as answer by tajnaj Sunday, October 2, 2011 6:21 PM
    Tuesday, April 5, 2011 10:16 PM
  • Hi Moadh

    I have the same BPC invalid error, I did try to delete the Platform parameters, both from CurrentControlSet, ControlSet001 and ControlSet002, but Blend still didn't work properly

    Still have the error:

    Build project: WindowsPhoneApplication1.sln, Targets: Build
    __________________________________________________
    Project "C:\Users\megan\Documents\Expression\Blend 4\Projects\WindowsPhoneApplication1\WindowsPhoneApplication1.sln" (Build target(s)):

    C:\Users\megan\Documents\Expression\Blend 4\Projects\WindowsPhoneApplication1\WindowsPhoneApplication1.sln.metaproj : error MSB4126: The specified solution configuration "Debug|BPC" 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 "WindowsPhoneApplication1.sln" -- FAILED.
    Build failed.


    Franklin
    Wednesday, April 27, 2011 2:57 AM
  • Hi Franklin

    There are 2 ways to solve this issue :

    • either via Control Panel > System > Advanced (on seven, last button in the left pan from the top) > Environment Variables (last button in first tab) 
      In System variables scroll down and locate the variable named "Platform", you'll notice that it's value is "BPC", go ahead and delete it.
      You'll probably will need to reboot your PC
    • Via Registry 
      Using regedit.exe navigate to the registry path
      "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
      and select the key Platform with the value BPC.
      Then you could either delete the value or the entire key.
      After this restart your PC.

    Hope this will help you


    MBS




    • Proposed as answer by Moadh Wednesday, April 27, 2011 10:40 AM
    Wednesday, April 27, 2011 10:40 AM
  • right click my computer -->properties-->advance system settings-->Environment Variable-->system variables

    and then delete "Platform"

    then restart pc and your blend will be as fine as u expect :P cheers

    Saturday, October 15, 2011 5:17 PM
  • Umair Khan

    Thanks

    Well It worked ....!!

    Thanks n cheers

    Anil Kolla


    Anil Kollaa

    Friday, May 11, 2012 10:28 AM