1

When building a Visual Studio 2015 project, I am getting the mismatch between architecture processor warning message discussed here.

Unfortunately, the accepted answer is no longer correct in Visual Studio 2015. There are actually two locations where the target platform can be specified. In the configuration manager, and in project build properties page.

If x86 is set as the active platform in configuration manager, but AnyCPU is specified in the project build properties, you will get the mismatch warning message.

Which begs the question. If I build with configuration manager set to Release x86, and the project build properties is set to Any CPU, what are the implications?

If I build Release x86 with the project build properties set to x86, is the resulting PE output going to be different?

If they are different, this seems like a disaster waiting to happen for ClickOnce distributions.

Community
  • 1
  • 1
gravidThoughts
  • 613
  • 5
  • 18
  • The Active Solution Platform allow you to configure a specific combination of configurations for each project. The Project Platform allow you to make specific configuration settings for a project. The project Platform target property is the setting that's used to tell which platform the project assembly is compiled for. Check this thread: http://stackoverflow.com/questions/9225017/active-solution-platform-vs-project-platform-vs-platform-target – starian chen-MSFT Aug 09 '16 at 06:51

1 Answers1

1

The Configuration and Platform of project property (build) are associated to platform configuration manager. We could add configuration and platform in configuration manager window and these items will be in project property’s (build) configuration and platform.

The Configuration manager is used for solution level, we could restrict some projects won’t be built for specified Configuration and Platform (uncheck build), when we build the solution file directly (.sln, right click solution to build), it will build the project according to that configuration and platform setting of Configuration manager, so some projects will be skipped to build. We could change current solution configuration and platform (default is the active configuration and platform):

enter image description here The project properties are used for project level (build with project file or right click project=>build) and the Platform target is the setting that indicate which platform the assembly is compiled for. For each Configuration and Platform, we could specify different Platform target.

The mismatch between architecture processor is related to platform target, so which configuration and platform you specified to build (could change in UI) for that platform target will affect it.

So, for your question, it is related to how you build (build solution/project) and which platform and configuration you specified.

starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53