question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: Unable to find version '1.2.20906.2' of package 'Roslyn.Compilers.CSharp'" when installing packages

See original GitHub issue

What 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, IDictionary2 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:closed
  • Created 6 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
devleadcommented, Apr 26, 2017

@nagoh FYI nuget.org has been having issues for a few hours, so might be related to that.

2reactions
gep13commented, Apr 26, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not find a part of the path ... bin\roslyn\csc.exe
The Roslyn compiler comes from a NuGet package and there is/was a bug in some versions of that package (I don't know exactly...
Read more >
Chocolatey Software | ScriptCs 0.17.1
Chocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages.
Read more >
Why am I getting the build error "Unable to find package ...
NET 6.0 projects. Verify that the build agent or environment has the necessary SDK and runtime versions installed.
Read more >
Microsoft.CodeAnalysis.Compilers 4.7.0
Version Downloads Last updated 4.7.0 79 a day ago 4.7.0‑2.final 188 2 months ago 4.7.0‑1.final 164 3 months ago
Read more >
Scripting Web API self host with Roslyn CTP – Part 1
In part 1, we will be using C# script files (CSX) and running them through a Roslyn tool called RCSI; Also in part...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found