web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

gp could not load file or assembly created by dag.exe

(0) ShareShare
ReportReport
Posted on by

I create a dll from a Dexterity CNK file. I have to sign it and it works fine in GP addin in my window 7 x64 PC.

dag.exe 7577 "C:\Program Files (x86)\Microsoft Dynamics\GP2013\Dynamics.set" /M /S:xx.snk

It cannot load in a windows 2008 x64 WM with same GP 2013.  Details as below:

System.IO.FileLoadException was unhandled

  Message=Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Dynamics\GP2013\Addins\Application.xx.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

  Source=mscorlib

  FileName=file:///C:\Program Files (x86)\Microsoft Dynamics\GP2013\Addins\Application.xx.dll

  FusionLog=""

  StackTrace:

       at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)

       at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

       at System.Reflection.Assembly.LoadFrom(String assemblyFile)

       at Microsoft.Dexterity.Bridge.AddinManager.LoadAddinsFromFolder(String folderName)

       at Microsoft.Dexterity.Bridge.AddinManager.InitializeAllAddIns()

       at InitAddIns()

       at _WinMainCRTStartup()

  InnerException: System.NotSupportedException

       Message=An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See go.microsoft.com/fwlink for more information.

       InnerException:

 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    I figured it out.

    Never copy dll using web tools like drop box. After removed the web copy flag, the error is gone.

    stackoverflow.com/.../net-local-assembly-load-failed-with-cas-policy

  • Suggested answer
    Community Member Profile Picture
    on at

    Does your integration have any other references added to it?  If so, those DLL's will also need to be added to your Dynamics GP installation folder.  For instance, if I reference the fixed assets module in my integration I would have to DAG and then include the subsequent DLL for FA along with the DLL for my integration.

    Regards,

    Aaron

  • Greg Kowieski Profile Picture
    157 on at

    For me, the answer was to copy my DLL's into the Visual Studio Tools directory where Dag exists.  Or copy the Dag.exe into the GP directory where your dll's should exist.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans