locked
assembly generation warning messages RRS feed

  • Question

  • I am receiving the following warning messages during my compile process:

    1)  Assembly generation -- Referenced assembly 'System.Data.dll' targets a different processor

    2)  Assembly generation -- Referenced assembly 'mscorlib.dll' targets a different processor

    I am using an AMD64/Windows x64 platform to do C# builds in Visual Studio 2005, and I specify x64 as the target platform.  The generated applications run as 64-bit applications, i.e. there is no *32 after their name in the Windows Task Manager.  The default business case should be for compatibility, however, I would like the Visual Studio environment to cooperate with my wishes.

    Is there any way to tell Visual Studio, "Yes, target this code only to run as a 64-bit application?"  What are the implications of the warning messages?

    And is there a way to tell Visual Studio, "Yes, upgrade the default numerical data types from 32 to 64 bits for selected applications?"  For example, I typed in a "large" value for an integer variable and received a data conversion error message.

    Thanks.

     

    Wednesday, January 18, 2006 9:43 AM

Answers

  • These warnings are ignorable.  They indicate that your 64bit application is referencing the 32bit FX binaries.  The warnings are ignorable since the metadata that makes up the interfaces for all FX binaries are identical between 32bit and 64bit.

    The recommended way to resolve these warnings is the following:

    Run with csc.exe /noconfig

    Then reference each 64bit FX binary as needed.  Since you are building on an X64 machine these binaries are located under ...\microsoft.net\framework64\v2.0.50727\...

     

    As you noted the resulting binaries do run as expected on 64bit and 32bit. 

    To answer your last question: int's will always be 32bit.  If you are looking for a 64bit integral value you should use long.  The only type that will have a different native size is IntPtr and UIntPtr.  These types will be 32bit on 32bit and 64bit on 64bit.

    Hope that this clarifies things.

    Jeff

    Wednesday, January 18, 2006 10:04 PM
    Moderator

All replies

  • These warnings are ignorable.  They indicate that your 64bit application is referencing the 32bit FX binaries.  The warnings are ignorable since the metadata that makes up the interfaces for all FX binaries are identical between 32bit and 64bit.

    The recommended way to resolve these warnings is the following:

    Run with csc.exe /noconfig

    Then reference each 64bit FX binary as needed.  Since you are building on an X64 machine these binaries are located under ...\microsoft.net\framework64\v2.0.50727\...

     

    As you noted the resulting binaries do run as expected on 64bit and 32bit. 

    To answer your last question: int's will always be 32bit.  If you are looking for a 64bit integral value you should use long.  The only type that will have a different native size is IntPtr and UIntPtr.  These types will be 32bit on 32bit and 64bit on 64bit.

    Hope that this clarifies things.

    Jeff

    Wednesday, January 18, 2006 10:04 PM
    Moderator
  • I enconuter this problem in a case of 32bit processor . The environment is nt os ,amd3000+ (32bit) processor , and vs2005 . And the error message is same . So , could you give me some comment about my problem . I feel strange as I have never encounter such error messages before ,and I have never modify the configration of solution .
    Tuesday, June 6, 2006 1:18 AM
  • Check your project properties, and look at the build tab's "Platform Target" setting. Make sure its set to "Any CPU", or in your case perhaps "X86" (if the message persists).
    Sunday, June 25, 2006 3:47 AM