none
MSBuild Platform='BPC' RRS feed

  • Question

  •  Hi All,
        I am having aproblem with MSBuild on a brand new machine, it's a fresh install of everything.  When I try to use MSBuild it is not functioning, here is the command and out I am using:


    E:\>"%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe" /t:Build /p:Configuration=Debug;OutDir=bin\ 
    /v:m /nologo 
    "E:\Test\Test.vbproj" 
     
    __________________________________________________  
    Project "E:\Test\Test.vbproj" (Build target(s)):  
     
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(490,9): 
    error : The OutputPath property is not set for this project.  
    Please check to make sure that you have specified a valid Configuration/Platform combination.  
    Configuration=
    'Debug'  Platform='BPC' 

    Done building project "Test.vbproj" -- FAILED.  
     
     
     

    Tthe problem seems to be that it's defaulting to the "Platform='BPC'" however i can run the same command on one of our older machine, and it will work just fine.  I tried adding a parameter to of "Platform=AnyCpu" and it did fix the problem, but I would really like to know where MSBuild would be getting the default platform, so i can fix the problem at that level.

    Here is the command that works.

    E:\>"%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\msbuild.exe" /t:Build 
    /p:Configuration=Debug;OutDir=bin\;Platform=AnyCpu /v:m /nologo 
    "E:\Test\Test.vbproj" 
    __________________________________________________  
    Project "E:\Test\Test.vbproj" (Build target(s)):  
     
    Test -> E:\Test\bin\Test.exe  
     


    Thanks,
    Adam J. O'Rourke
    Tuesday, September 30, 2008 1:23 PM

Answers

All replies

  • You have the Platform environment variable set. Remove that environment variable and you'll be good to go.

    http://www.kodefuguru.com/post/2008/09/Environment-Variables-and-MSBuild.aspx
    KodefuGuru.com - Life Student of the Kodefu Arts
    • Marked as answer by Adam J ORourke Tuesday, September 30, 2008 2:04 PM
    Tuesday, September 30, 2008 1:42 PM
  • Thank you Chris, you are absolutely right, this new build does have a platform environment variable set that our other machines does not. 

    Adam
    Tuesday, September 30, 2008 2:05 PM
  • Adam

    Are you also running a Gateway box? It would be nice to try track down what software is making this entry.


    Tuesday, September 30, 2008 3:34 PM
    Moderator
  • No this is a HP box.  I did try to figure out what piece of software added the entry, but with out rebuilding the machine step by step and watching for it, I'm not sure i will ever be able to know.

    Adam
    Tuesday, September 30, 2008 5:02 PM
  • Thanks, deleting the Windows "Platform" environment variable worked for me too :).

    I too am working on an HP box but this is a new problem for me: the solution concerned used to build fine on this box. Something must have set (or possibly reset) the Platform environment variable to BPC recently.

    Note:

    1. The Platform environment variable is not set on my other development machine.

    2. The only thing I could find on "BPC" so far is related to SAP & we don't use that.

    Tuesday, June 16, 2015 9:55 AM