1

I am trying to use new nuget feed for Sitecore 9.1.0 - https://sitecore.myget.org/F/sc-platform-9-1/api/v3/index.json and when running next command:

install-package Sitecore.Kernel -IgnoreDependencies

I am getting an error:

install-package : Failed to add reference. The package 'Sitecore.Kernel' tried to add a framework reference to 'sysglobl' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for 
assistance.
  Reference unavailable.
At line:1 char:1
+ install-package sitecore.kernel -IgnoreDependencies
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

I can confirm that I have latest (at the moment) .Net Framework 4.7.2 SDK installed on my PC and my VS project is targeting 4.7.2 as well

Is it a package error?

2
  • 1
    Are you using package-reference or packages.config?
    – Chris Auer
    Jan 22, 2019 at 13:38
  • packages.config Jan 22, 2019 at 14:57

3 Answers 3

1

For the 9.1 packages you need to update your VS Project to use PackageReferences - Tools Version 15 etc. - also to use the ignore dependencies flag.

Side-note; this is an important point to remember when planning and estimating an upgrade of a customer solution to Sitecore 9.1 since updating projects can in some cases require changes to build scripts etc.

1
  • 2
    PackageReferences is an option. Not a requirement.
    – Chris Auer
    Jan 23, 2019 at 13:24
1

I could not reproduce issue on my machine, but I have idea what could be wrong.

When you download Sitecore.Kernel package from 9.1 feed and will look on its specification(.nuspec), you will see that it has sysglobl dependency, which stays for System.Globalization. My guess is that for some reason there is an issue with finding of sysglobs.

My first suggestion how to overcome it is next:

  1. Add reference to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2\sysglobl.dll before installation of package

My second suggestion:

  1. Download required Sitecore.Kernel nuget package
  2. Edit Sitecore.Kernel.nuspec file inside it. (Nuget packages are zip archives. You can edit files directly in archive and it is still will be valid package. Or you can unzip all files from package and prepare new one using nuget.exe)
  3. Change assemblyName="sysglobl" with assemblyName="System.Globalization"
  4. Save package to some location. (Or you can edit it directly in packages folder. In this case step 5 could be skipped)
  5. Install package from your local location by specifying -Source parameter

P.S. I have no idea why assemblyName="sysglobl" is used instead of assemblyName="System.Globalization". It worth to raise support ticket on this.

2
  • Thanks for your suggestions. I did add the 'sysglobl' reference to the project, and apparantly Ithere is some inconsistency with other references: install-package : Failed to add reference. The package 'Sitecore.Kernel' tried to add a framework reference to 'System.Design' which was not found in the GAC. This is possibly a bug in the package. Please contact the package owners for assistance. I tried to change to .netFramework 4.7.1 (which is declared as a version of 9.1.0) platform, but that gives me same errors. Jan 22, 2019 at 11:56
  • @VolodymyrHil Have you checked your GAC?(Run VS Command Prompt, type "gacutil -l"). Are assemblies that causes issue present in the GAC?
    – Anton
    Jan 22, 2019 at 12:45
1

So my problem was that i tried to use packages.config instead of PackageReference. So the resolution was installing this https://marketplace.visualstudio.com/items?itemName=CloudNimble.NuGetPackageReferenceUpgrader extension and upgrading to the PackageReference nuget format.

Read more about PackageReference in this post

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.