Developer forum

Forum » Development » DLL Hell - support Fody Weavers

DLL Hell - support Fody Weavers

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

In order to solve some of the DLL issues I am running into, I am trying to use Fody Weavers: https://github.com/Fody/Costura, an excellent NuGet package that lets you embed one assembly into another. The idea is to embed, say, NewtonSoft.Json into my own assemblies so those can use a specific (newer) version of that assembly while DW continues to use its own. This normally works well as Fody takes care of loading the connected assembly at run time.

However, with Dynamicweb, it keeps crashing when loading the assemblies at startup (see attached), I guess that's because it wants to load missing assemblies from disk maybe and doesn't support the dynamic ones? Is there a way that Dynamicweb and external libraries like this one can coexist more easily? Maybe have a subscriber for each missing assembly that I can handle and tell DW that it's OK that the DLL is missing and that I'll handle it myself?

I'd love to get this to work as it solves many of the painful versioning issues I am running into.

Thanks!

Image_788.png

Replies

 
Nicolai Pedersen
Reply

Hi Imar

I do not see any Dynamicweb things in that call stack...

Is all of this just Newtonsoft? I think it is a LOT of trouble to go through to work a bit with json... Crossing the river to fetch water as we would say in Denmark.

And easy solution would be for us to upgrade to newtonsoft new or you to use 8?

BR Nicolai

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
This post has been marked as an answer

I was actually thinking about doing it for dependencies too. I think we have some overlap with other Dynamicweb DLLs like dotlesscore and Antlr3.Runtime. Also, by embedding assemblies our deployment gets easier: we just deploy a single DLL and we always have the right version of the DLL without any additional configuration in web,.config to forward DLLs.

>> And easy solution would be for us to upgrade to newtonsoft new or you to use 8?

Would love to but I have external components that force me to use a later version. Upgrading your version would work only until the external component changes its dependency...

I'll experiment with this a bit more and see if the Ignore list we're talking about in the other thread solves this.

Thanks!

Votes for this answer: 1

 

You must be logged in to post in the forum