Changing a Visual Studio C# project from x86 to Any CPU

前端 未结 1 883
盖世英雄少女心
盖世英雄少女心 2020-12-14 07:26

I am working on some C# projects with Visual Studio 2005, and I am trying to change the platform target from x86 to Any CPU. I already went through all the dependencies that

相关标签:
1条回答
  • 2020-12-14 08:06

    Make sure you've changed both the Configuration Platform and the Platform Target to Any CPU. If all else fails you can open up the .csproj and manually change the references. Right click on the Project, goto Unload Project. Then right click and goto Edit MyProject.csproj. The properties for the project may still include the default Platform as x86:

      <PropertyGroup>
        <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
        <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    

    Also consider the case where the Solution still has the x86 configuration in Configuration Manager. I've found for some complex Solutions with multiple projects that have different configurations I have to spend a lot of time in Configuration Manager getting everything straight.

    0 讨论(0)
提交回复
热议问题