Derik Whittaker

Syndication

News


Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Nasty MSBuild Error - MSB4126 "Debug|HPD" issue

Today I was trying to put together a simple NAnt build script for a 'play' project of mine.  This build script is real simple, it only calls MSBuild right now.  However, when I was running the script I kept getting the message 'error MSB4126: The specified solution configuration "Debug|HPD" is invalid.'

For the life of me I could not figure out what this was.  I spent time on Google, and could not find anything useful.  What made this more strange was that I could compile via the solution file.

Finally it dawned on me to check my Environmentimage Variables on my  machine.  About half way down was a variable 'Platform' with a value of 'HPD'.  I removed that variable, and rebooted, now all is right with the world again (ok, all is right with the build).

Hope this helps someone else out, cause I know it was pissing me of.

Till next time,


Posted 02-29-2008 1:55 PM by Derik Whittaker

[Advertisement]

Comments

lordabdul wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 02-29-2008 5:33 PM

Why reboot? You just had to close your command line window and reopen a new one!

Derik Whittaker wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 02-29-2008 5:49 PM

That did not seem to work for me.

Johnny Triantafyllopoulos wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 04-09-2008 6:46 AM

Thanks for the tip, it saved me hours of frustration!

sylvain rodrigue wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 06-05-2008 4:12 PM

You're right ! Many thanks for this tip !

By the way, after having read your post, I found on this page (channel9.msdn.com/.../checkwhetheranenvironmentvariablehasbeenset) that MSBUILD use env var for any property missing.

I also found this page (forums.microsoft.com/.../ShowPost.aspx) where a guy explains that the PLATFORME environment variable is set by an HP utility (see the last post of the page).

Thanks again !

Shane Barrington wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 09-22-2008 10:41 AM

Thanks that tip helped. I opted to notepad my solution file then pick the appropriate platform instead of removing the variable.

Arun Surendran wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 12-02-2008 4:18 AM

My System I had the issue with "Debug|BPC" this post solved me a day ... Thanks

Aruna wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 12-22-2008 11:06 PM

Thanks...this saved me a lot of time

Peter Beams wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 01-26-2009 9:39 AM

Thanks, could have been a nasty one to hunt down without your help!  Was on an HP machine using "Debug|BPC".

MIchael Washington wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 01-30-2009 9:19 AM

Worked for me! I did not have to reboot eaither. I was trying to get Windows Azure Samples to build when trying to run the buildall.cmd script.

Simon Martin wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 02-23-2009 7:24 AM

Superb!

I was starting to struggle with this problem; likewise wasn't finding much on Google - but this was spot on. Didn't work without the reboot, but that's not important and Derik said it needed the reboot.

Am also on an HP machine - wonder why that seems to be important.

Jon wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 09-23-2009 3:37 PM

Wow!  Been scratching my head over this one for a long while.  Thanks for the very useful tip!

Maarten Smits wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 09-25-2009 12:24 AM

Thanks!!!!! You've saved me many hours of utter frustration!

Daniel wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 10-02-2009 11:44 AM

Thanks I removed the variable PLATFORM: BNB and now it works.

Dana wrote re: Nasty MSBuild Error - MSB4126 "Debug|HPD" issue
on 10-13-2009 2:23 PM

Also, my thanks to you!  Unlike your situation, this caused 30 seconds of head-scratching until we found your post.  

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)