Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8555639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:10:11+00:00 2026-06-11T15:10:11+00:00

I have a C# project in Visual Studio 2010 with this in the pre-build

  • 0

I have a C# project in Visual Studio 2010 with this in the pre-build event command line:

echo "$(Configuration)" - "$(PlatformName)" - "$(Platform)"
exit 1

and the results are:

"Debug" - "AnyCPU" - "AnyCPU"

even though the macro section of that window suggests that PlatformName should appear as Any CPU in this case (with a space): https://i.stack.imgur.com/yzplE.png (even though MSDN seems to suggest that there is no space at http://msdn.microsoft.com/en-us/library/42x5kfw4.aspx).

msbuild /property:Configuration="Debug" /property:Platform="AnyCPU"
1>MyProgram.sln.metaproj : error MSB4126: The specified solution configuration "Debug|AnyCPU" is invalid.

What’s going on here? Unfortunately, "AnyCPU" is not a valid platform on the command line, so I am unable to proceed. The above works just fine with /property:Platform="Any CPU" (with a space).

Is there another macro I can use, or some flag for MSBuild to accept the platform anyway?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:10:12+00:00Added an answer on June 11, 2026 at 3:10 pm

    It looks like you’ve hit MSBuild bug 503935:

    Report:

    The msbuild Platform property has a different value for Any CPU
    depending upon whether you are building the solution or building a
    project.

    Solution use Platform=”Any CPU” – space

    Project use Platform=”AnyCPU” – no space

    Response:

    Posted by Microsoft on 11/2/2009 at 7:22 PM

    Thanks for taking the time to send us your feedback.

    Unfortunatley, having just shipped Beta 2, it is too late in the cycle
    to make adjustments at this point. It makes perfect sense that we
    should make these two the same. Looks like we should use “AnyCPU”
    consistently for both. We also need to make sure that we are backward
    compatible, so we will have to take this in consideration.

    In the next round, we hope to be doing work around the solution, and
    we can perhaps fix this during that cycle. For this cycle, I am
    resolving this bug as “Won’t Fix”.

    Thanks,

    Chuck England

    Visual Studio Platform Program Manager – MSBuild

    Final Resolution:

    Closed as Won’t Fix

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Visual Studio 2010 C# project which creates an .exe and this
I have created SQL Server 2008 Database project using visual studio 2010. after build
Is there a way to modify Visual Studio 2008 or 2010 project pre-build events
What I have here is this: A Biztalk project in Visual Studio 2010, a
I have a unit test project in Visual Studio 2010 (.NET 4) that utilizes
In my Visual Studio 2010 project I have files with .mm file extension, that
In Visual Studio 2010 I have an ASP.NET MVC 3 project called blahblah. As
Has anyone migrated a VB6 project to .Net with Visual Studio 2010? I have
I have a C# application, and a Visual Studio (2010) Setup Project with it.
I have a Visual Studio 2010 project that is targeted to .NET Framework 3.5.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.