Home Dashboard Directory Help
Search

Mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference by iamtgo3


Status: 

Closed
 as By Design Help for as By Design


7
0
Sign in
to vote
Type: Bug
ID: 759796
Opened: 8/27/2012 9:29:45 AM
Access Restriction: Public
0
Workaround(s)
view
4
User(s) can reproduce this bug

Description

This is an application that I wrtoe and worked just fine in VS2010. Seagull said it should work with VS2012 but I may need to add this line to app.config file.

<startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>

Also Schema dotNetConfig20.xsd, dotNetConfig30.xsd, dotNetConfig35.xsd, dotNetConfig40.xsd do not have this in the XML. However DotNetConfig.xsd did but was not checked in XML Schemas set to automatic.

<xs:element name="startup" vs:help="configuration/startup">
    <xs:complexType>
     <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="supportedRuntime" vs:help="configuration/startup/supportedRuntime">
         <xs:complexType>
            <xs:attribute name="version" type="xs:string" use="optional" />
            <xs:attribute name="sku" type="xs:string" use="optional" />
         </xs:complexType>
        </xs:element>
        <xs:element name="requiredRuntime" vs:help="configuration/startup/requiredRuntime">
         <xs:complexType>
            <xs:attribute name="version" type="xs:string" use="optional" />
         </xs:complexType>
        </xs:element>
     </xs:choice>
     <xs:attribute name="useLegacyV2RuntimeActivationPolicy" type="xs:string" use="optional" />
    </xs:complexType>
</xs:element>

I have seen a bunch of post with similiar issues and they almost all revolve around .NET Framework 4.5.
https://connect.microsoft.com/VisualStudio/feedback/details/728995/new-vs2010-project-compiler-warning-since-installing-dotnet4-5-vs2011-beta This post says closed as resoved but I am having similiar issues with .NET Framework 4.5.
Details
Sign in to post a comment.
Posted by Manco00 on 3/27/2013 at 11:58 AM
I am running against this issue when including a reference to an external library. I make sure I rebuild the external library for the proper target (x86) and then build the primary app that links the library in the x86 target, and the error occurs. This project was working fine but then when I was switching targets at some point it got stuck with this error. I have tried cleaning and rebuilding both the library and the app but no help.

1>------ Rebuild All started: Project: ApiLib, Configuration: Debug x86 ------
1> ApiLib -> C:\Users\Rick\Documents\Visual Studio 2012\Projects\repos\ApiLib\ApiLib\bin\x86\Debug\ApiLib.dll
2>------ Rebuild All started: Project: App, Configuration: Debug x86 ------
3>------ Rebuild All started: Project: ApiLib, Configuration: Debug x86 ------
2>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): error MSB3270: There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "ApiLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL", "ARM". 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.
3>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): error MSB3270: There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "ApiLib", "ARM". 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.
========== Rebuild All: 1 succeeded, 2 failed, 0 skipped ==========
Posted by Microsoft on 9/6/2012 at 4:35 PM
Thanks for your feedback. Please use the workaround mentioned below.
Posted by Microsoft on 8/29/2012 at 4:01 PM
If you are sure you want to suppress this warning, you should be able to do it by setting ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=false.
This can be done either by adding a property into your project file, or by setting an environment variable, or by using /p if you're running msbuild.exe.
Posted by MatthewTJ on 8/29/2012 at 7:16 AM
I am recieving the same error in VS 2010 and I am not able to roll back
Posted by Microsoft on 8/28/2012 at 4:26 PM
Hello, this is a new warning, but it is flagging a real potential problem. If you reference anything directly or indirectly that is bitness specific (in this case 32 bit specific) your app probably won't work if it's run as a 64 bit process. Therefore you should mark your app (your exe project) as 32 bit (x86) as well.
Posted by Microsoft on 8/27/2012 at 9:43 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 8/27/2012 at 11:52 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.