Search code examples
c#.netsap-dotnet-connector

Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format


I have got this error while I am using SAP .NET Connector 3.0 x64:

Could not load file or assembly 'sapnco' or one of its dependencies. An attempt was made to load a program with an incorrect format

I couldn't find any solution at Stack Overflow, so I'd like to share here for others who stuck at same problem like me.


Solution

  • Run > Regedit

    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\1X.0\WebProjects   
    

    Change Use64BitIISExpress from 0 to 1 Restart Visual Studio and IISExpress.