MSBuild problem with /p:Target=Any CPU

411 views
Skip to first unread message

Michael Powell

unread,
Jan 27, 2012, 2:22:18 PM1/27/12
to jenkins...@googlegroups.com
Jenkins (and/or Hudson) users,
 
Has anyone else (I'm assuming EVERYONE else) encountered this issue:
 
MSBuild gets confused resolving the Target property when it is Any CPU? MSBuild confusion is that it thinks that Jenkins is specifying multiple build projects.
 
If we want to specify Any CPU, how do we do it?
 
One plausible workaround is to leave Target out and go with whatever the default (Active?) one is? Or better, specify the target other than Any CPU?
 
How have some of you approached this?
 
Thanks...
 
Best regards,
 
Michael

Neerenberg, Aaron

unread,
Jan 27, 2012, 2:23:19 PM1/27/12
to jenkins...@googlegroups.com

Cheated and mapped AnyCPU to “Any CPU”…

Michael Powell

unread,
Jan 27, 2012, 2:25:13 PM1/27/12
to jenkins...@googlegroups.com
Cheers. Kudos. We'll probably adopt this approach as well... :)

Neerenberg, Aaron

unread,
Jan 27, 2012, 2:25:34 PM1/27/12
to jenkins...@googlegroups.com

That said, if you want explicit control over whether you get 32 bit or 64 bit artifacts, I’d suggest using the platform tags specifically instead of Any CPU;  Any CPU will result in choosing the platform that is the least common denominator of all your dependencies.  i.e., if you are building on a 64 bit system, and you have just one dependency to a 32 bit artifact, you will end up with a 32 bit build…

 

Regards,

Aaron

Slide

unread,
Jan 27, 2012, 3:31:15 PM1/27/12
to jenkins...@googlegroups.com
Whenever I use Any CPU, I just do /p:Target="Any CPU"
--
Website: http://earl-of-code.com

Michael Powell

unread,
Jan 27, 2012, 3:47:21 PM1/27/12
to jenkins...@googlegroups.com
I've tried that; that was my first attempt, and it didn't like that either.

Slide

unread,
Jan 27, 2012, 4:00:20 PM1/27/12
to jenkins...@googlegroups.com
Did you try escaping the " with \ ?
--
Website: http://earl-of-code.com

Michael Powell

unread,
Jan 27, 2012, 4:27:01 PM1/27/12
to jenkins...@googlegroups.com
I didn't actually. I'll try that. Thanks...

Michael Powell

unread,
Jan 27, 2012, 4:28:55 PM1/27/12
to jenkins...@googlegroups.com
Bingo. We have a winner.
Reply all
Reply to author
Forward
0 new messages