Using referenced .NET dlls together with custom dll in k2 smartforms

  • 29 October 2019
  • 3 replies
  • 168 views

Hey everyone.
I have 2 dlls, one I created and one referenced. I created the .NET class library using visual studio. C# and nuget , Now I want to use the same .NET library. In a k2 workflow. Now here is the worry. I used a Microsoft interop from Nuget which makes it 2 dlls in this case.

I can register the dll (my own I created in visual studio) and use as a smartobject. Now if we can remember, the other dll (Microsoft interop) is used as a reference to my own main class library.

Question is, how can I add Nuget libraries so that my own dlls can out rightly reference it before I convert to smartobjects.


3 replies

Badge +4

Hi!

When you are installing a Nuget-package it's only copying over the files that you need to run the functionality in the Nuget package, in this case the file is a dll. To run this with K2 you need to point out your class library and your class library needs to now where the referenced dll is located. The simplest is to put it in the same folder as your class library. You could look how Visual Studio creates it in your debug folder when you build the project and take the dlls from there.

 

So you don't have to add the Nuget package to K2, only make sure that the dlls that are referenced in your own class library can be found by rou code.


Regards

Daniel

Uh, that is to say i have to register the two DLLs as End point Assembly? Is that what you imply? Please let me know.

Badge +4
You only need to register the DLL that you want to create a smartobject on as en Endpoint assembly.
But the two DLLs needs to be in the same folder since they have dependencies to each other. Else you will get an error when your dll won't find the second dll.

/Daniel

Reply