Dev Ops Pipeline Build Issue with recent packages

Vote:
 

Our DevOps pipeline was building fine on 9/9.  No Issues.

Now, as of about Thursday 9/16, the build that worked fine on 9/9 (and subsequent builds) will no longer work due to a Nuget dependency issue that I cannot figure out.

  • Locally it builds fine with no issues using Episerver.Commerce 13.31.0.0
  • On DevOps though with the same code, I get this: Assembly 'EPiServer.Personalization.Commerce' with identity 'EPiServer.Personalization.Commerce, Version=3.2.28.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' uses 'EPiServer.Business.Commerce, Version=13.31.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' which has a higher version than referenced assembly 'EPiServer.Business.Commerce' with identity 'EPiServer.Business.Commerce, Version=13.31.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'
  • If I try to use Nuget Package Manager to upgrade Episerver.Commerce to 13.31.1.0 it tries, but errors saying: Unable to find a version of 'Castle.Windsor' that is compatible with 'EPiServer.CMS.Core 11.20.8 constraint: Castle.Windsor (>= 4.1.0 && < 5.0.0)'.               
  • For giggles, I even upgraded Castle.Windsor to 4.1.1, no good

Any idea what the heck is going on?

The only thing that "solved" the issue was downgrading EPiServer.Personalization.Commerce to 3.2.27 and setting up a Binding Redirect for 13.31.1 -> 13.31.0 on Episerver.Commerce.

#263677
Sep 23, 2021 20:52
Vote:
 

We had similar issues when we were using Foundation baseline code, where the dependencies were directly related to the projects and were not managed globally using package.config. We solved it by using global nuget package.config files which ensures it only download the package that is defined in the configuration file.

~ Sujit

#263678
Sep 23, 2021 22:21
Vote:
 

Thanks, Sujit, I do not think that is the issue as this is not Foundation and we use package.config, too.

We are now having this problem on other solutions, too.  Currently we are continuing to have to put in place binding redirects on them all to get around it.  I really do think it is a dependency issue across Epi packages on 13.31.1.0

#263717
Sep 24, 2021 14:24
Vote:
 

Thanks David for the confirmation.

Did you reach Episerver Developer Support? I believe they are able to create a defect and resolve as soon as possible.

~ Sujit

#263755
Sep 24, 2021 18:51
Vote:
 

That is very strange, you should be able to upgrade to 13.31.1 without problem. Could you just upgrade to CMS 11.20.8 first? 

#264001
Sep 28, 2021 9:46
Vote:
 

I am now having this problem on 3 different solutions.

I upgraded CMS to 11.20.8, then CMS.UI to 11.36.0 and they work fine on local host, but on the CI server and DXP I receive both in CMS:

  • System.IO.FileLoadException: Could not load file or assembly 'EPiServer.Business.Commerce, Version=13.31.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'EPiServer.Business.Commerce, Version=13.31.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'

and in Commerce Manager:

  • System.IO.FileLoadException: Could not load file or assembly 'EPiServer.Business.Commerce, Version=13.31.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'EPiServer.Business.Commerce, Version=13.31.1.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'

So then I attempt to upgrade Commerce to 13.31.1.0 locally and it does not upgrde, automtically backs out the requested 13.31.1 and goes back to 13.31.0, and gives error message:

  • Could not install package 'EPiServer.Commerce.Azure 15.0.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.                

   Note that Commerce.Azure is at 14.0.20 already before I started this.  (this is new error since you all released .net 5, but same result, before it was the Castle.Windsor issue)

The only thing that worked was putting in the binding redirects:

  • <bindingRedirect oldVersion="0.0.0.0-13.31.1.0" newVersion="13.31.0.0" />
#264207
Edited, Sep 30, 2021 5:27
valdis - Oct 04, 2021 9:14
if I recall correctly - binding redirects were always present for many if not all Epi packages..
Vote:
 

I was having a very similar issue locally. What I found was that I had a cached version of EPiServer.Commerce.Azure 14.0.20, where the .nuspec had an incorrect dependency. After clearing that package out of my nuget cache (on Windows, here: %userprofile%\.nuget\packages ), and letting it re-download from the nuget feed, everything seems to be working as expected for me.

If you're not sure if that's your issue, one way to check is to open the package file (EPiServer.Commerce.Azure.14.0.20.nupkg) (just unzip it) and check out the file EPiServer.Commerce.Azure.nuspec -- the dependency on EPiServer.Commerce.Core should be [13.31.1], NOT [13.31.0].

#265014
Oct 13, 2021 22:46
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.