Developer forum

Forum » Development » Is NuGet still supported?

Is NuGet still supported?

Karol Barkowski
Reply

Hi,

In our team we have a project that was initiated by installing DW as a nuget package. All went relatively fine and the project is working.

The problem raises when we try to either  update that project or even install newest DW packages on a completely blank solution. There are many issues with package versions after that. Package versions that I can see in the packages.config file and the bindings that are defined in the web.config file are in many cases completely different. So DW is installing some versions while web.config requires different versions. The result is of course an error similar to this one below. But that's just a single example. But there are many more.

Any chance to have this fixed or is NuGet out of support now and nobody is using it?

Just please, please don't bring up this "solution" that I can just manually copy dlls to my bin folder. It's 2024.

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Yup, Nuget is supported.

You can do a couple of things if references are broken - they can be depending on how they are installed, your nuget settings, development environment etc.

Read here how to possibly resolve nuget issues: https://learn.microsoft.com/en-us/nuget/consume-packages/reinstalling-and-updating-packages

You might need to fix your web.config if it is not straight out of DW but have been around for some time - you might also have a setting in nuget in VS that will not update web.config or something else - see below.

You also have to clean the solution solution to remove deprecated dlls from /bin:

Purche your local nuget cache to ensure they are installed properly:

And force a re-install of the packages:

Update-Package -reinstall

Depending on how you installed what (i.e. if you ignored dependencies, or took the lowest dependency for some packages) you can also run into this and need to install the missing/failing package in the right version.

I agree that the amount of nuget packages requires and their dependencies is quite extensive and can cause some of these issues. Also because of the dependencies of non-nuget based dlls.

With Dynamicweb 10 everything has been modernized quite a bit and versions on all main packages share same versions to simplify updates.

BR Nicolai

 
Karol Barkowski
Reply

Thank you Nicolai but those issues are not with my packages but with DynamicWeb packages.
The only thing needed to reproduce that is to create empty website and run "Install-Package Dynamicweb.Admin -Version 9.16.5 -includeprerelease" command and copy the content of the dynamicweb.web.config to the web.config file. All exactly as stated in the documentation. And that's it. This website won't run since you have different binding redirects specified in the config file and different package versions installed. 

I know how to deal with packages that I create and install. But since DW is a commercial product and our team is paying for the license then it feels natural for me that we expect it to work. And it just doesn't.
So my question is - is there any chance to have this issue fixed as soon as possible? NuGet is pretty much standart tool in .net world. I'd really like to be able to use it. And DW docs claim that I should be able to use it. But for now, that is impossible.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Karol

Yes, sorry.

QA have looked into it and registered bug devops#17029 to fix the issue.

Thank you for reporting.

 
Karol Barkowski
Reply

Any news on this? Its starting to get urgent for us.
Please advice.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Karol

You can follow progress on bugs here: https://doc.dynamicweb.com/downloads/dynamicweb-9/bug-fixes/known-bugs - it will be fixed in the spint and be in the next release of 9.16 after that sprint.

It was my impression that you had the issue solved as it seems to be related to the faulty binding redirects in the .config files. You should be able to solve it - maybe just by removing the binding redirects in web.config.

Sorry about the inconvenience.

BR Nicolai

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

As a temporary workaround you can try this after you have copied the contents of dynamicweb.web.config to web.config

  1. Remove all binding redirects from web.config: <assemblyBinding ...>...</ assemblyBinding>
  2. Rebuild the application
  3. Go to View > Error List and then double click on any error related to version conflicts ("Found conclicts between different versions...") and select "Yes" when prompted about updating binding redirects.
  4. Rebuild the application

 

You must be logged in to post in the forum