Developer forum

Forum » Development » DLL Hell - Dynamicweb overwriting DLLs

DLL Hell - Dynamicweb overwriting DLLs

Imar Spaanjaars
Imar Spaanjaars
Reply

Hi there,

We have many custom solutions that use a component that has a dependency on Newtonsoft JSON 11. The site is set up as custom but has /Admin point to a shared Admin folder. Whenever I log in to the backend, Dynamicweb does an upgrade check and then downgrades Newtonsoft to version 8 that ships with the core product leading to a broken site. How can I prevent that from happening? I see a few options:

1. On my server, I just overwrite the DLL in the source's application folder. Works, but requires us to do this every time we update a solution to a newer DW version.

2. Use a custom Admin folder. Works, but adds a lot of disk and management overhead to have custom, isolated versions of the app.

3. Don't overwrite the DLL when it's either not native (i.e. not a Dynamicweb DLL), or b) when the target version is already higher or c) when the target version is registered as a dependentAssembly in web.config.

I'm having fun all day with #1 and #2. Any chance you would want to look into supporting #3?

Thanks!

Imar

 

Replies

 
Nicolai Pedersen
Nicolai Pedersen
Reply

4th solution: Use a 8.0 dependency...

@3: Wee could do that - but could end up in the opposite problem of not updating dll's that needs to be updated. We could make an ignore list in global settings? Configurable and more explicit?

BR Nicolai

 
Imar Spaanjaars
Imar Spaanjaars
Reply

>> 4th solution: Use a 8.0 dependency...

I would love to. but I can't. We have at least one external component with a NuGet dependency on Newtonsoft 11, so I see no other option than giving it that DLL.

Yeah, an ignore list would also help. But wouldn't dependentAssembly already do it? It register the highest version of the DLL you want to use, so the source is from before that version, don't copy it.

Thanks!

 
Imar Spaanjaars
Imar Spaanjaars
Reply

Bump... This is a real problem that hits us every time we do an upgrade, Any signs of a better solution? 

 
Nicolai Pedersen
Nicolai Pedersen
Reply

Hi Imar

Just made a simple update that will look at the version in /admin's bin folder and only copy it if it is newer than the one found in /bin. See dump. TFS#59417

I have no experience with dependentAssembly and currently we do not have time to look into this - priority... But you are more than welcome to post a pull request if you have a quick fix. You have to look in Dynamicweb.Hosting.Iis.UpdateBin.

BR Nicolai

Capture.PNG
 
Nicolai Pedersen
Nicolai Pedersen
Reply

Had to roll back 59417 because it made downgrade not work.

 

You must be logged in to post in the forum