You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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").
The text was updated successfully, but these errors were encountered:
NCarlsonMSFT
added
Needs more info
Apply this label for the bugs where a some new information is needed from the customer.
and removed
Needs more info
Apply this label for the bugs where a some new information is needed from the customer.
labels
Nov 14, 2024
The warning is harmless as the compose project doesn't have real output referencing the csproj. As a workaround you can change the "platform" of the .dcproj
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:
Steps to Reproduce
Environment
Additional Information
Workaround
The workaround provided by @NCarlsonMSFT works great!
The text was updated successfully, but these errors were encountered: