Skip to content

Processor Architecture Mismatch Warning (MSB3270) During Docker-Compose Build #449

@zugzwangm

Description

@zugzwangm

Processor Architecture Mismatch Warning (MSB3270) During Docker-Compose Build

Description

When using a Docker Compose project with an ASP.NET Core application (tested on versions 8 and 9), and setting the ASP.NET platform target to x64 (due to the use of native packages), the Docker Compose build phase generates the following warning:

warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "<ASPNET project DLL>", "AMD64".

Steps to Reproduce

  1. Create a Docker Compose project with an ASP.NET Core application.
  2. Set the platform target for the ASP.NET project to x64 (typically needed when using native packages).
  3. Build.

Environment

  • Visual Studio: Tested on 17.11.x and 17.12.0
  • ASP.NET Core: Tested on .NET 8 and .NET 9

Additional Information

  • The mismatch is between the docker-compose project architecture ("MSIL"; why is it MSIL?) and the referenced ASP.NET DLL ("AMD64").

Workaround

The workaround provided by @NCarlsonMSFT works great!

Metadata

Metadata

Assignees

No one assigned

    Labels

    workaround-availableApply this label when there is an easy workaround available.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions