Unable to resolve dependency Sitecore.Framework.Conditions from Sitecore.Mvc.Analytics

Hi there,

I'm attempting to create a VS solution using steps outlined here:

https://doc.sitecore.net/sitecore_experience_platform/developing/developing_with_sitecore/set_up_sitecore_and_visual_studio_for_development

And when it comes time to install the Sitecore.Mvc.Analytics package from Nuget, it fails with an "Unable to resolve dependency Sitecore.Framework.Conditions" error.  I can't find a single google hit on what that could mean. 

Can anyone help out?

Thanks much.

- Wililam

  • This error is not happening for me. Can you please try running the command with version like below in package manager console .

    Install-Package Sitecore.Mvc.Analytics -Version 8.2.170728 -Source sitecore.myget.org/.../index.json

    (-Source is needed if you have not defined Options Packages sources in Visual studio)

    Also I do not see the Sitecore.Framework.Conditions in dependencies list of Sitecore.Mvc.Analytics. You can find the versions list in below link.

    Reference: sitecore.myget.org/.../8.2.170728

    Just FYI: Sitecore.Framework.Conditions is found in dependencies list of below package.
    sitecore.myget.org/.../1.1.7

  • In reply to Sandeepkumar Gupta:

    Thanks Sandeepkumar,

    I failed to mention that I'm setting up Sitecore 9, targeting .NET 4.6.2, which really would have been a great thing to mention :) I successfully installed the 9.x versions of Sitecore.Kernel and Sitecore.Mvc before failing on the Analytics step.

    So, my concern in doing what you suggest is that Analytics 8.2.170728 is targeting 4.5.2 while Analytics 9.0.171002 is targeting 4.6.2. I can't imagine that older version will work for me as I need a 4.6.2-capable version. Is there an issue in the 9 setup perhaps? I notice that these packages were recently released this week to help with that install.

    It's odd to me as well that Sitecore.Framework.Conditions is being tripped up when it isn't in the dependencies list. That's what eventually led me here as it wasn't something I could resolve through finding and installing it.

    If there's a package that installs a 4.6.2 version of it, I could go that route.

    Thanks again.

    - William
  • In reply to William Cooper:

    Another side note, I'm running VS2017 with this.

    Thanks.
  • In reply to William Cooper:

    Okay, so it turns out that installing the .NoReferences versions of those files works. Using the regular versions results in the error I described above. So I'm able to move forward, but just a heads up that the full references versions can cause issues on installation.
  • In reply to William Cooper:

    True William. I was able to reproduce the issue in case of Sitecore 9. Running below command with .NoReferences is one way if we want to skip dependencies.

    Install-Package Sitecore.Mvc.Analytics.NoReferences -Version 9.0.171002 -Source sitecore.myget.org/.../index.json

    We can even use -IgnoreDependencies option as below:-

    Install-Package Sitecore.Mvc.Analytics -IgnoreDependencies

    Just FYI:

    Before running above commands, I even added sc-commerce-packages feed url: https://sitecore.myget.org/F/sc-commerce-packages/api/v3/index.json

    But then I started getting Unable to resolve dependency 'Sitecore.Framework.Configuration.Extensions'. 

    Good to read : When should I use the “NoReferences” NuGet packages? 

  • Hi all,

    It would appear we had an issue with packages surfacing correctly on myget. Hopefully this should be resolved now!

    Please clear your caches for the sc-packages feed and try restoring again.
  • In reply to Kieran Marron:

    Time to ghost this thread.

    I'm getting the same problem now - when trying to get version 3.3.0 installed. 3.2.0 works just fine.

    Attempting to resolve dependencies for package 'Sitecore.Framework.Common.Extensions.3.3.0' with DependencyBehavior 'Lowest'
    Resolving dependency information took 0 ms
    Resolving actions to install package 'Sitecore.Framework.Common.Extensions.3.3.0'
    Resolved actions to install package 'Sitecore.Framework.Common.Extensions.3.3.0'
    Retrieving package 'Sitecore.Framework.Common.Extensions 3.3.0' from 'Official Sitecore'.
    GET sitecore.myget.org/.../3.3.0 2
    Removed package 'Sitecore.Framework.Common.Extensions.3.2.0' from 'packages.config'
    Successfully uninstalled 'Sitecore.Framework.Common.Extensions.3.2.0' from Foundation.Profile
    NotFound sitecore.myget.org/.../3.3.0 2 308ms
    Install failed. Rolling back...

     

    So it tries to download https://sitecore.myget.org/F/sc-packages/api/v2/package/Sitecore.Framework.Common.Extensions/3.3.0+2

    But https://sitecore.myget.org/F/sc-packages/api/v2/package/Sitecore.Framework.Common.Extensions/3.3.0 works. 

  • In reply to Mark Cassidy:

    Same problem exists for Sitecore.Framework.Conditions.4.0.0

    Attempting to resolve dependencies for package 'Sitecore.Framework.Conditions.4.0.0' with DependencyBehavior 'HighestMinor'
    Resolving dependency information took 0 ms
    Resolving actions to install package 'Sitecore.Framework.Conditions.4.0.0'
    Resolved actions to install package 'Sitecore.Framework.Conditions.4.0.0'
    Retrieving package 'Sitecore.Framework.Conditions 4.0.0' from 'Official Sitecore'.
    GET sitecore.myget.org/.../4.0.0 2
    NotFound sitecore.myget.org/.../4.0.0 2 154ms
    Install failed. Rolling back...
    Package 'Sitecore.Framework.Conditions.4.0.0' does not exist in project 'Foundation.Profile'
    Package 'Sitecore.Framework.Conditions.4.0.0' does not exist in folder 'C:\Projects\UTC\Makers-Sitecore\packages'
    Executing nuget actions took 438.05 ms
    Package 'Sitecore.Framework.Conditions.4.0.0' is not found on source 'sitecore.myget.org/.../'.
    Time Elapsed: 00:00:01.0877744
    ========== Finished ==========
  • In reply to Mark Cassidy:

    Actually for all the Sitecore.Framework packages
  • In reply to Mark Cassidy:

    Hey Mark (and all), there was an issue with our supplier at MyGet which has now been resolved. NuGet v2 should now be working just fine.

    The workaround (direct reference to sc-framework-packages) should no longer be needed.