Skip to content

Instantly share code, notes, and snippets.

@tedyyu
Created May 7, 2022 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tedyyu/77a2fff1696d5fd30eb04eb154fe02b9 to your computer and use it in GitHub Desktop.
Save tedyyu/77a2fff1696d5fd30eb04eb154fe02b9 to your computer and use it in GitHub Desktop.
AxImp
AxImp Error: API restriction: The assembly '' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
If you met this, check the path specified in /rcw: is an absolute file path instead of relative one, e.g.
cd c:\code\app
aximp.exe ..\bin\rtsxdlg.dll /rcw:C:\code\bin\Interop.MyOcx.dll /out:..\bin\AxInterop.MyOcx.dll /keyfile:mykey.snk /ignoreregisteredocx /verbose
will work,
compared to the following
aximp.exe ..\bin\rtsxdlg.dll /rcw:..\bin\Interop.MyOcx.dll /out:..\bin\AxInterop.MyOcx.dll /keyfile:mykey.snk /ignoreregisteredocx /verbose
which is not always working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment