Skip to content

After migrate warning, "There was a mismatch between the processor architecture of the project being built" appeared #674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
srivatsn opened this issue Jan 17, 2017 · 2 comments

Comments

@srivatsn
Copy link
Contributor

From @MarkMichaelis on January 17, 2017 22:4

After migrating a solution, the following warning appeared:
Severity Code Description Project File Line Suppression State Warning MSB3270 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Dropbox\SCC\GIT\IntelliTect.Repo\Coalesce\src\Coalesce.Domain\bin\Debug\net46\Coalesce.Domain.exe", "x86". 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. Coalesce.Domain.Tests C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 1912

Hard coding the projects to x86 resolved the problem - but the project should be AnyCPU.

See the following commit to reproduce the problem: IntelliTect/Coalesce@4358d48

/cc @natidea @jinujoseph @morrisjoe @GrantErickson @breaman @ascott18

Copied from original issue: dotnet/project-system#1225

@rainersigwald
Copy link
Member

If the warning is accurately describing the state of the world, MSBuild does provide an escape hatch: the property

<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>

But if the issue is that the .exe is x86 instead of MSIL, then this would be silencing a useful warning.

@nguerrera
Copy link
Contributor

Closing as duplicate of #396, the plan for which will fix this.

mmitche pushed a commit to mmitche/sdk that referenced this issue Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants