While using SAP .NET connector, I am an getting error: Could not load file or assembly 'sapnco' or one of its dependencies.


You can try any of the below fixes −

Go to Run > Regedit

Open “HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\1X.0\WebProjects” and change Use64BitIISExpress from 0 → 1

Next is to restart Visual Studio and IISExpress.

Other solution would be to try configuring IIS service, and set appPool .Net 4.0. You can try this to fix sapnco dll issue.

Go to IIS Manager → Application Pools

Other fix would be to navigate to Project/Properties → Set platform target from “any” to “x86”.

Updated on: 14-Feb-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements