"Error: Unable to find version '1.2.20906.2' of package 'Roslyn.Compilers.CSharp'" when installing packages
See original GitHub issueWhat You Are Seeing?
Error when bootstrapping Cake
What is Expected?
No error
What version of Cake are you using?
0.19.3
Are you running on a 32 or 64 bit system?
64
What environment are you running on? Windows? Linux? Mac?
Windows
Are you running on a CI Server? If so, which one?
Reproduced both locally and on TC
How Did You Get This To Happen? (Steps to Reproduce)
(Clean repository, including nuget cache) Run .\build.ps1
Output Log
Downloading and installing Roslyn…
Installing packages (using https://packages.nuget.org/api/v2)…
Error: System.InvalidOperationException: Unable to find version ‘1.2.20906.2’ of package ‘Roslyn.Compilers.CSharp’.
at NuGet.PackageRepositoryHelper.ResolvePackage(IPackageRepository sourceRepository, IPackageRepository localReposito
ry, IPackageConstraintProvider constraintProvider, String packageId, SemanticVersion version, Boolean allowPrereleaseVer
sions)
at NuGet.PackageManager.InstallPackage(String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean
allowPrereleaseVersions)
at Cake.Scripting.Roslyn.Stable.RoslynScriptSessionFactory.Install(DirectoryPath root)
at Cake.Scripting.Roslyn.Stable.RoslynScriptSessionFactory.CreateSession(IScriptHost host)
at Cake.Scripting.Roslyn.RoslynScriptEngine.CreateSession(IScriptHost host, IDictionary2 arguments) at Cake.Core.Scripting.ScriptRunner.Run(IScriptHost host, FilePath scriptPath, IDictionary
2 arguments)
at Cake.Commands.BuildCommand.Execute(CakeOptions options)
at Cake.CakeApplication.Run(CakeOptions options)
at Cake.Program.Main()
src/Cake/project.json has the following reference: Roslyn.Compilers.CSharp
Which has been unlisted from nuget: https://www.nuget.org/packages/Roslyn.Compilers.CSharp/
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (5 by maintainers)
Top GitHub Comments
@nagoh FYI nuget.org has been having issues for a few hours, so might be related to that.
NuGet.org, unless there is a strong reason to not, always keeps package versions in place. While they can be unlisted (which removes them from appears on the site and don’t show up in search, installing them directly using the
version
parameter should always work.