none
Setting copy local property to False RRS feed

  • Question

  • Hi,

    We have migrated few application from VB6 to VB.net.In our applications we are using many interop dll's. We are referencing all the inter-op dll's from a shared location.When we set the copy Local property to TRUE the application is able to load the dll's.

    When we set this property to FALSE we are getting the below exception.

    An error occurred creating the form. See Exception.InnerException for details.  The error is: Could not load file or assembly 'AxInterop.ComctlLib, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

    We are getting the above for all other interop dll's when we add the references from the shared location with setting the copy local property to FALSE.

    Could you please let me know if we can set copy local property to FALSE when we referenced the interop dll's  from a shared location.

    Thanks & Regards,

    Arpan.

    Thursday, August 22, 2013 9:41 AM

Answers

  • In a .NET application, a referenced dll must be located in either the Global Assembly Cache (GAC) or the output path of the project at runtime. If the Copy Local property is set to true, the reference is copied to the output path of the project. If you set it to false, you will need to add the assembly to the GAC: http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx
    Thursday, August 22, 2013 9:51 AM