Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Package Manager concepts

Package Manager concepts

Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

I have two questions regarding the deployment manager package manager.

There was a bug fix to the Paypal Express provider about 11 months ago. That's in version 1.0.4 for Dynamicweb.Ecommerce.CheckoutHandlers.PayPalExpressCheckout. However, the latest download of 9.5.5 has 1.0.3 in it, which doesn't include the bug fix.

Should the latest download always have the most recent versions? It almost seems as if the package manager could be more up to date than the latest full release download.

My second question is with the package manager itself. When I view the updates, it says "Some packages are missing from application. Please click to restore". When I click to restore, it tries to restore, but about 10 of the files receive an error that they couldn't get some version. The Install button is not available to upgrade the PayPal update. I assume that's because the restore didn't complete successfully. Where do I start to troubleshoot that, and is there a way to use the Packages Manager to restore a file, even if some packages are missing?

Thanks,

Scott


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply
This post has been marked as an answer

Hi Scott,

I assume that you are talking about the Package Manager (Settings > Packages) and not the Deployment Manager (Settings > Developer > Deployment).

You will often see newer versions of packages in the package feed than those included in the downloadable releases. The latest release will not necessarily include all of the latest packages.

The package manager was improved a lot during the first 9.* releases, so the behavior depends on which version you are using.
There will be some issues when trying to update packages on older versions, because we lost some of the old packages at some point. We had issues with the nuget package feed hosted on MyGet and we are looking into hosting all nuget packages on our own server in order to prevent these issues from happening in the future.

It should work on more recent versions though.
I have just tested this and it works fine by doing the following:

1) Install and configure a clean solution based on downloaded zip file, Application(9.5.0).zip
2) Restore packages

  • Settings > Packages > Updates
  • Click "Restore"
  • Packages successfully restored.

3) Update package Dynamicweb.Ecommerce.CheckoutHandlers.PayPalExpressCheckout

  • Settings > Packages > Updates > Dynamicweb.Ecommerce.CheckoutHandlers.PayPalExpressCheckout
  • Select version 1.0.4
  • Click "Update"
  • Package successfully updated.

The issues with missing packages can be difficult to overcome. The package manager in Dynamicweb is based on NuGet and it requires that all referenced packages are available in order to get metadata about dependencies before updating to a newer version. You might be able to fix it manually though:

  • Update the packages.config file by changing the version number of the package to a version that exists (use a lower version than the one you actually need)
  • Settings > Packages > Updates
  • Click "Restore"
  • Settings > Packages > Updates > {package name}
  • Select version
  • Click "Update"

For debugging an issue with packages you can set up a project in Visual Studio with the same packages.config and then use the NuGet Package Manager to restore/update.
If you use the following command in package manager console you will get detailed information about any errors that occur:

Update-Package -Reinstall -Debug -Verbose

 

Best regards,
Morten

Votes for this answer: 1
 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Morten,

Nice reply. You're right, I've had Deployment Manager on my mind a lot recently and typed it wrong in my post. I updated the subject line and corrected my post to Package Manager.

With your guidance, I was able to figure out the main issue. I updated the packages.config file from a recent application download and that fixed it. The version we've been carrying along had built up some differences and needed to be refreshed. That took care of being able to restore the packages and update the components.

I do have one remaining question though, is there a reason that the PayPalExpressCheckout component is on 1.0.3 since 1.0.4 appears to have been released last January? Is it not safe to assume that a fresh application download will have the most recent stable version of all of the components?

Thanks,

Scott

 

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

I'll ask the release manager about that :)

/Morten

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply

Hi Scott

“Is it not safe to assume that a fresh application download will have the most recent stable version of all of the components?”
In general: no. Some component releases are specifically for features in next major release. To include them in hotfixes would just be introducing potential error sources. 
When we introduced packages we initally included all the latest (non-branched) packages in every hotfix and it caused a significant bump in support cases. So we quickly course-corrected to only including what’s absolutely necessary

In the case of PayPalExpressCheckout though, “somebody” just forgot to do his reference update task. And as nobody outside the US uses the component, nobody has brought it to my attention before now. I'll make sure it's updated in the next hotfix release

/Morten Buhl

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Hi Morten Buhl,

Thanks for the details on that. In that case, I won't plan to always count on all components to be available in each hotfix. But it's good to know that there is a reason for PayPalExpressCheckout so that it will be in future releases.

Leave it to us in the US to mix things up. :)

Scott

 

You must be logged in to post in the forum