SGEN error while building 64-bit application on a 32-bit machine RRS feed

  • Question

  • Hi,

    I am using VS2010 to build a 64-bit application on a 32-bit machine with .Net framework 2.0 (32-bit) installed. When I compile the project, it gave the following error:

    SGEN : error : An attempt was made to load an assembly with an incorrect format: C:\path\to\refered.dll

    The 'refered.dll' exists in the folder and it is 64-bit. And I need the xmlSerializers.dll.


    I guess it is because the sgen.exe is 32 bit on the machine and it cannot work on the 64bit dll.  Then I tried coping a 64-bit sgen.exe to the machine and let the VS call that 64bit one. But it does not work as "it is not a valid 32 bit application".

    Could anyone help please? Thanks a lot

    Friday, May 20, 2011 3:53 PM

All replies

  • Besides building it as a 32-bit application, I'm not sure what you could do.
    John Saunders
    WCF is Web Services. They are not two separate things.
    Use WCF for All New Web Service Development, instead of legacy ASMX or obsolete WSE
    Use File->New Project to create Web Service Projects
    Friday, May 20, 2011 7:35 PM
  • As it is an office add-in to work with office 2010 64-bit, I have to build it as a 64-bit application.

    I am now trying to build it on a 64-bit machine and I could use the sgen now. But there is another problem. Where can I get the 64-bit Microsoft.Samples.Security.SSPI.dll ?


    Monday, May 23, 2011 10:22 AM
  • I got it now. I downloaded the REMSSPI.exe and installed it. It has the SSPI dll for any CPU.
    Monday, May 23, 2011 12:52 PM