Developer forum

Forum » Dynamicweb 10 » dll reference issue when installing custom add-ins

dll reference issue when installing custom add-ins

Chris Søgaard
Chris Søgaard
Reply

Hi DW

We have some issues getting our custom extensions to DW working, if that extension depends on other (maybe specific) NuGet packages.

We are packing our custom library to a .nupkg file and installing that through the CLI which initially works without errors, but it seems like there's some dependency check, where dll files are sorted out and only dll files without an existing reference is being added during the install phase, which also in theory makes sense.

But in my specific example the dll file "Azure.Core.dll" which my library depends on is not being added, and this causes an error on start-up on our custom module.

I can see that the package "Dynamicweb.DataIntegration" depends on "Azure.Identity" which again depends on "Azure.Core", which means there should be a reference somewhere, and my custom extension reference the same version, so it is not a version issue.

The extension works if I run it locally, both from source code but also referencing the local NuGet package in Visual Studio, but not when I install it in DW.

I can provide the .nupkg file on demand if needed for recreating the issue or debugging

BR Chris

 


Replies

 
Frederik Nielsen Dynamicweb Employee
Frederik Nielsen
Reply

Hi Chris,

 

I can replicate your issue by creating an addin using Azure.Core 1.45.0, however when I change that version to 1.38.0, which is what my Dynamicweb is running, I no longer get the issue. This leads me to believe it is because of versioning, especially since Azure.Core 1.45.0 has a specified minimum version of 1.45.0. In your case I see you're using 1.41.0, if you could try and change that to 1.38.0 (or whichever version your Dynamicweb is using) I believe it would work.

I have however found the issue, as it seems that Dynamicweb only downloads packages if it doesn't have the package locally, regardless of version - the same with subsequent dependencies (1.45.0 has a dependency on System.Memory.Data 6.0.0 while 1.38.0 has on System.Memory.Data 1.0.2).

I will be proposing a fix for this issue, however temporarily you should be able to have it work if you use 1.38.0, as long as you don't need anything specific from between 1.38.0 and 1.41.0.

 

Best regard,

Frederik Nielsen

 

 
Chris Søgaard
Chris Søgaard
Reply

Hi Frederik

Thank you for getting back to me on this. I can confirm that it is indeed a version issue, and I was blinded by internal project references in my prior conclusion.

We now got it working by doing centralized package management in Directory.Packages.props, and this syncs the versions of the packages from DynamicWeb.Suite onto the underlying projects.

However we did find an issue in the distributed setup using the Nuget packages for release rings, which caused the extension to fail again. Seems like DynamicWeb.Suite.Ring1 refers to version 10.12.5 on Nuget.org, but in DW Cloud all solution on R1 release ring has been updated to 10.13.0, see images below.

So even though we can have this fixed by deploying a new version there's 2 things that come to my mind:

  • If the installation of packages are dependent on very specific versions of dll files, then updates to minors and bugfixes as part of releases to DW Cloud could theoretically cause packages to fail, if those packages refers to dll files that are also being refered by DynamicWeb
  • DynamicWeb.Suite.RingX must reflect the current version of the hosting otherwise a deploy will not fix the issue

I hope your fix for versioning as you wrote in your comment will be able to at least reault in apps not being broken when new minors or bugfixes are released, and I hope that we can look into the fact that DynamicWeb.Suite.RingX on Nuget.org does not seem to reflect the correct version on hosting environment.

BR Chris

 

You must be logged in to post in the forum