Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB3271 error code.
Message text
MSB3271: There was a mismatch between the processor architecture of the project being built 'value' and the processor architecture, 'value', of the implementation file 'value' for 'value'. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and implementation file, or choose a winmd file with an implementation file that has a processor architecture which matches the targeted processor architecture of your project.
Description
The WinMD file is the Windows Metadata file, which contains type information for UWP or WinRT applications that enables language projection. For more information, see WinMD files.
Resolution
If you can, follow the advice in the error text and change the processor architecture as suggested, either in the Configuration Manager in Visual Studio, or in the project file.
In some cases, you can ensure in your own code that the dependent assembly isn't loaded in a context that can create a compatibility conflict. You might want to change this error into a warning. You can make the change by setting the property ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch
to Warning
or None
.
<PropertyGroup>
<!-- other property settings -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
Applies to
All versions of MSBuild