-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
workaround-availableApply this label when there is an easy workaround available.Apply this label when there is an easy workaround available.
Description
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
- Create a Docker Compose project with an ASP.NET Core application.
- Set the platform target for the ASP.NET project to x64 (typically needed when using native packages).
- 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
Labels
workaround-availableApply this label when there is an easy workaround available.Apply this label when there is an easy workaround available.