0

I have a vb.net application I'm looking to be able to distribute in the near future.

I'm not the original architect and the previous developer referenced a handful of .dll's that are under a GPL license.

All of the software that includes these dll's are freely available online, so my customer can go download and install them if they need that functionality. So I don't have to distribute the DLLs.

Currently they are referenced under the "Reference" part of the project file. My question is, how do I resolve these dll's in a way similar to how the "references" dons it, but at runtime.

My plan is to search the registry for the location of these dll's and reference that location, but given the file location of the .dll, how do I "pull" that code into my project.

Thanks

  • What is the end goal though? Is this to alleviate a deployment issue that could come up? Generally when you build all Dependent libraries build with the executable. So if you have a consoleapp called 'main' that references a library project 'helper'. You would have a bin folder that builds a 'main.exe' and also has 'helper.dll' with it. If you are wanting a more thorough deployment process it depends on the front end you are deploying. If it is a client framework like Winforms or WPF you could use a ClickOnce deployment and just ensure those libraries are required during deployment. – djangojazz Mar 10 '17 at 16:41
  • The end goal it to be able to use these .dll files, without distributing. In some cases they user doesn't need that software to operate, just to access some features. Its fine if they need those feature to say "you need to go download this from xxxx first." But I need to handle the non presence of those .dll files, which is tough. At the very least, at run time, or at install time. I need to say, I know where these are, now how do I reference them. – Daniel Moss Mar 10 '17 at 16:45
  • 1
    Gotcha, you may want to look into doing late binding then similar to this code project then: https://www.codeproject.com/Articles/485145/Late-Binding-to-NET-objects-in-NET – djangojazz Mar 10 '17 at 16:47
  • 1
    See http://stackoverflow.com/questions/1892492/set-custom-path-to-referenced-dlls for some ideas – Steven Doggart Mar 10 '17 at 17:04

2 Answers2

0

You may try this

  1. Search for Dll on specified path for dll
  2. Use reflection to load assembly or dll into you code at runtime
  3. Create runtime object from the loaded dll
  4. Call required functionality from the dll

Reflection is the key solution to your problem that you may use to plugin new functionality into your project without distributing the dlls

Vijay Parmar
  • 795
  • 4
  • 13
0

This is the only solution that works

http://mylifeandsql.com/2018/03/26/replication-readpast-error/

also you can just start your migration with the following command

Sql(@"SET TRANSACTION ISOLATION LEVEL READ COMMITTED");

This will replicate dll changes like adding new column to a replicated table

You will also find that the column is automatically added to replicated articles > columns

No need to create a new snapshot nor set the sync to re-initialization ☺

Thanks

Adel Mourad
  • 1,351
  • 16
  • 13