sitecore.cli 6.0.23 and dotnet core sdk 8.0 dependency error

Gist: For recent release of Sitecore CLI 6.0, .NET Core 8.0 SDK is a pre-requisite.

Details:

This is another simple note for the benefit of search results. Sitecore CLI had a recent release in sept 2024. Bumped upon the following error while running dotnet tool restore and had to install .net core sdk 8.0 hence adding the details here so that you don't need to run around albeit just the installation url for relevant dotnet core sdk.

Error: error NU1202: Package sitecore.cli 6.0.23 is not compatible with net7.0 (.NETCoreApp,Version=v7.0) / any. Package sitecore.cli 6.0.23 supports: net8.0 (.NETCoreApp,Version=v8.0) / any Package "sitecore.cli" failed to restore, due to Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored.

   at Microsoft.DotNet.Tools.Tool.Install.ProjectRestorer.Restore(FilePath project, PackageLocation packageLocation, String verbosity)   at Microsoft.DotNet.ToolPackage.ToolPackageInstaller.InstallPackageToExternalManagedLocation(PackageLocation packageLocation, PackageId packageId, VersionRange versionRange, String targetFramework, String verbosity)    at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)

Restore failed.


.NET install location:

Shows v8.0 is absent:


Since the sdk is needed, download x64 SDK Installer from https://versionsof.net/core/8.0/8.0.2/ and install:

End-result of installation:


Post installation, dotnet tool restore works fine:


Other error(s)
:

The following error occurred in a new development machine when I tried to download XMC logs using this script. Based on the error, the xmcloud cli plugin isn't installable. Since this is a new machine and it is my development machine, I just added the Sitecore nuget source in Visual Studio package manager and re-executed the PS script then the XMC cli worked fine. 

Name: Sitecore (something meaningful)
Source: https://nuget.sitecore.com/resources/v3/index.json


Failed to install version  of plugin Sitecore.DevEx.Extensibility.Xmcloud. Failed to install version  of plugin Sitecore.DevEx.Extensibility.Xmcloud.
sitecore.cli is not found in NuGet feeds https://api.nuget.org/v3/index.json, C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\".

Comments