question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mismatch between processor architecture.

See original GitHub issue

Steps to reproduce

  1. In VS 2015 create a .net web project targeting full framework.
  2. Add a Nuget package reference to “Microsoft.ServiceFabric.Services” which targets only AMD64. or any other package that targets only AMD64.
  3. Build -> build will be fine.
  4. Open this project in another machine with VS 2017 and this will migrate the project.
  5. Build

Expected behavior

Build should succeed

Actual behavior

Build shows several warnings

1>------ Build started: Project: WebApplication1, Configuration: Debug Any CPU ------ 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric.data\2.4.164\lib\net45\Microsoft.ServiceFabric.Data.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric.data\2.4.164\lib\net45\Microsoft.ServiceFabric.Data.Interfaces.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric\5.4.164\lib\net45\Microsoft.ServiceFabric.Internal.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric\5.4.164\lib\net45\Microsoft.ServiceFabric.Internal.Strings.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric.services\2.4.164\lib\net45\Microsoft.ServiceFabric.Services.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric.services\2.4.164\lib\net45\ServiceFabricServiceModel.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric\5.4.164\lib\net45\System.Fabric.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built “x86” and the processor architecture of the reference “C:\Users\ravipal.nuget\packages\microsoft.servicefabric\5.4.164\lib\net45\System.Fabric.Strings.dll”, “AMD64”. 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 1>WebApplication1 -> C:\Users\ravipal\Documents\Visual Studio 2017\Projects\WebApplication1\src\WebApplication1\bin\Debug\net452\WebApplication1.exe 1>Done building project “WebApplication1.csproj”. ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

Environment data

dotnet --info output: .NET Command Line Tools (1.0.0-rc4-004847)

Product Information: Version: 1.0.0-rc4-004847 Commit SHA-1 hash: b7692237d1

Runtime Environment: OS Name: Windows OS Version: 10.0.14393 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\1.0.0-rc4-004847

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:4
  • Comments:24 (7 by maintainers)

github_iconTop GitHub Comments

10reactions
ek68794998commented, Mar 21, 2017

I’m able to reproduce this issue as well. I have tried with both x64 and Any CPU configurations in my solution.

My csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net452</TargetFramework>
    <PreserveCompilationContext>true</PreserveCompilationContext>
    <AssemblyName>Foo</AssemblyName>
    <OutputType>Exe</OutputType>
    <PackageId>Foo</PackageId>
  </PropertyGroup>

  <ItemGroup>
    <None Include="App.config" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.2" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.2" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.2" />
    <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.2" />
    <PackageReference Include="Microsoft.ServiceFabric" Version="5.4.145" />
    <PackageReference Include="Microsoft.ServiceFabric.Data" Version="2.4.145" />
    <PackageReference Include="Microsoft.ServiceFabric.Services" Version="2.4.145" />
    <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
  </ItemGroup>

  <ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
    <Reference Include="System.Web" />
    <Reference Include="System" />
    <Reference Include="Microsoft.CSharp" />
  </ItemGroup>

</Project>

Errors:

Warning	CS8012	Referenced assembly 'Microsoft.ServiceFabric.Services, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' targets a different processor.	Foo	CSC	1	Active
Warning	CS8012	Referenced assembly 'System.Fabric, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' targets a different processor.	Foo	CSC	1	Active
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric.data\2.4.145\lib\net45\Microsoft.ServiceFabric.Data.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric.data\2.4.145\lib\net45\Microsoft.ServiceFabric.Data.Interfaces.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric\5.4.145\lib\net45\Microsoft.ServiceFabric.Internal.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric\5.4.145\lib\net45\Microsoft.ServiceFabric.Internal.Strings.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric.services\2.4.145\lib\net45\Microsoft.ServiceFabric.Services.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric.services\2.4.145\lib\net45\ServiceFabricServiceModel.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric\5.4.145\lib\net45\System.Fabric.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
Warning	MSB3270	There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "C:\...\.nuget\packages\microsoft.servicefabric\5.4.145\lib\net45\System.Fabric.Strings.dll", "AMD64". 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 references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.	Foo	Microsoft.Common.CurrentVersion.targets	1964	
4reactions
tbertenshawcommented, Aug 21, 2017

I’m having this issue with dotnetcore2.0 and vs2017 15.3.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

There was a mismatch between the processor architecture ...
The message says that you are trying to use a dependency that is of an architecture that doesn't match the target architecture your...
Read more >
How do I fix the Visual Studio compile error, "mismatch ...
Go to the Build|Configuration Manager menu item. Find your project in the list, under Platform it will say "Any CPU"; Select the "Any...
Read more >
Solved: Build warning - mismatch between the processor ...
Solved: warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor.
Read more >
Warning: There was a mismatch between the processor ...
This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration ...
Read more >
Warning message: Processor architecture mismatch
There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "Leadtools.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found