locked
Why does adding a C++ project change platform target of others projects in the solution?

    Question

  • I have a solution that holds various c# winrt, class library projects. If I add c++ blank windows store project to the solution all other projects platform targets gets set to x86 and creates a big mess.

    If I manually set platform targets back to Any CPU. I get 

    Error 13 /platform:anycpu32bitpreferred is not a valid setting for option /target:library or /target:module

    errors. I managed to fix this by removing <Prefer32bit>true</Prefer32bit> lines from csproj files.

    Now I am in doubt. Maybe this behaviour was intentional for some reason and I made an even bigger mess?

    Monday, September 02, 2013 8:19 AM

Answers

  • Hi Darius,

    Welcome to MSDN forum!

    Did you remove <Prefer32bit>true</Prefer32bit> and reload it as shown below:

    Open the project file in notepad and remove <Prefer32Bit>true</Prefer32Bit> then reload it  (you can also right click on the project in solution explorer, choose unload project, right click on the project again, choose edit someproject.csproj, after making the edit, save, and right click and reload.

    And i think your issue is a building issue, then i'd like to move it to Tools for Windows Store apps if you agree with me.

    Thanks for your understanding.

    Best Regards!


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 03, 2013 1:45 AM
    Moderator