microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.38k stars 2.22k forks source link

Unable to Install-Package Microsoft.CodeAnalysis -Version 3.9.0-2.final (and any other version) in NET 4.8 #1287

Open ViacheslavUKR opened 3 years ago

ViacheslavUKR commented 3 years ago

Install-Package Microsoft.CodeAnalysis -Version 3.8.0

Attempting to gather dependency information for package 'Microsoft.CodeAnalysis.3.8.0' with respect to project 'CsToKotlinTranspiler', targeting '.NETFramework,Version=v4.8'
Gathering dependency information took 1.11 min
Attempting to resolve dependencies for package 'Microsoft.CodeAnalysis.3.8.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.CodeAnalysis.3.8.0'
Resolved actions to install package 'Microsoft.CodeAnalysis.3.8.0'
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.common/3.8.0/microsoft.codeanalysis.common.3.8.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.csharp/3.8.0/microsoft.codeanalysis.csharp.3.8.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.workspaces.common/3.8.0/microsoft.codeanalysis.workspaces.common.3.8.0.nupkg
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic/3.8.0/microsoft.codeanalysis.visualbasic.3.8.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.csharp/3.8.0/microsoft.codeanalysis.csharp.3.8.0.nupkg 291ms
  OK https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.common/3.8.0/microsoft.codeanalysis.common.3.8.0.nupkg 295ms
Installing Microsoft.CodeAnalysis.Common 3.8.0.
Installing Microsoft.CodeAnalysis.CSharp 3.8.0.
  OK https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic/3.8.0/microsoft.codeanalysis.visualbasic.3.8.0.nupkg 15591ms
Installing Microsoft.CodeAnalysis.VisualBasic 3.8.0.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.csharp.workspaces/3.8.0/microsoft.codeanalysis.csharp.workspaces.3.8.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.workspaces.common/3.8.0/microsoft.codeanalysis.workspaces.common.3.8.0.nupkg 18378ms
Installing Microsoft.CodeAnalysis.Workspaces.Common 3.8.0.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic.workspaces/3.8.0/microsoft.codeanalysis.visualbasic.workspaces.3.8.0.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic.workspaces/3.8.0/microsoft.codeanalysis.visualbasic.workspaces.3.8.0.nupkg 5181ms
Installing Microsoft.CodeAnalysis.VisualBasic.Workspaces 3.8.0.
Retrieving package 'Humanizer.Core 2.2.0' from 'nuget.org'.
Retrieving package 'Microsoft.Bcl.AsyncInterfaces 1.1.1' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis 3.8.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.Analyzers 3.0.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.Common 3.8.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.CSharp 3.8.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.VisualBasic 3.8.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.VisualBasic.Workspaces 3.8.0' from 'nuget.org'.
Retrieving package 'Microsoft.CodeAnalysis.Workspaces.Common 3.8.0' from 'nuget.org'.
Retrieving package 'System.Buffers 4.5.1' from 'nuget.org'.
Retrieving package 'System.Collections.Immutable 5.0.0' from 'nuget.org'.
Retrieving package 'System.Composition 1.0.31' from 'nuget.org'.
Retrieving package 'System.Composition.AttributedModel 1.0.31' from 'nuget.org'.
Retrieving package 'System.Composition.Convention 1.0.31' from 'nuget.org'.
Retrieving package 'System.Composition.Hosting 1.0.31' from 'nuget.org'.
Retrieving package 'System.Composition.Runtime 1.0.31' from 'nuget.org'.
Retrieving package 'System.Composition.TypedParts 1.0.31' from 'nuget.org'.
Retrieving package 'System.Memory 4.5.4' from 'nuget.org'.
Retrieving package 'System.Numerics.Vectors 4.5.0' from 'nuget.org'.
Retrieving package 'System.Reflection.Metadata 5.0.0' from 'nuget.org'.
Retrieving package 'System.Runtime.CompilerServices.Unsafe 4.7.1' from 'nuget.org'.
Retrieving package 'System.Text.Encoding.CodePages 4.5.1' from 'nuget.org'.
Retrieving package 'System.Threading.Tasks.Extensions 4.5.4' from 'nuget.org'.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis/3.8.0/microsoft.codeanalysis.3.8.0.nupkg
Adding package 'Humanizer.Core.2.2.0' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'Humanizer.Core.2.2.0' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'Humanizer.Core.2.2.0' to 'packages.config'
Successfully installed 'Humanizer.Core 2.2.0' to CsToKotlinTranspiler
Adding package 'Microsoft.CodeAnalysis.Analyzers.3.0.0' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'Microsoft.CodeAnalysis.Analyzers.3.0.0' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'Microsoft.CodeAnalysis.Analyzers.3.0.0' to 'packages.config'
Executing script file 'E:\Projects\KotlinConverter\Project\packages\Microsoft.CodeAnalysis.Analyzers.3.0.0\tools\install.ps1'
Successfully installed 'Microsoft.CodeAnalysis.Analyzers 3.0.0' to CsToKotlinTranspiler
Adding package 'System.Buffers.4.5.1' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Buffers.4.5.1' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Buffers.4.5.1' to 'packages.config'
Successfully installed 'System.Buffers 4.5.1' to CsToKotlinTranspiler
Adding package 'System.Composition.AttributedModel.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.AttributedModel.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.AttributedModel.1.0.31' to 'packages.config'
Successfully installed 'System.Composition.AttributedModel 1.0.31' to CsToKotlinTranspiler
Adding package 'System.Composition.Convention.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.Convention.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
  OK https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis/3.8.0/microsoft.codeanalysis.3.8.0.nupkg 4638ms
Installing Microsoft.CodeAnalysis 3.8.0.
Added package 'System.Composition.Convention.1.0.31' to 'packages.config'
Successfully installed 'System.Composition.Convention 1.0.31' to CsToKotlinTranspiler
Adding package 'System.Composition.Runtime.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.Runtime.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.Runtime.1.0.31' to 'packages.config'
Successfully installed 'System.Composition.Runtime 1.0.31' to CsToKotlinTranspiler
Adding package 'System.Composition.Hosting.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.Hosting.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.Hosting.1.0.31' to 'packages.config'
Successfully installed 'System.Composition.Hosting 1.0.31' to CsToKotlinTranspiler
Adding package 'System.Composition.TypedParts.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.TypedParts.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.TypedParts.1.0.31' to 'packages.config'
Successfully installed 'System.Composition.TypedParts 1.0.31' to CsToKotlinTranspiler
Adding package 'System.Composition.1.0.31', which only has dependencies, to project 'CsToKotlinTranspiler'.
Adding package 'System.Composition.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.1.0.31' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Composition.1.0.31' to 'packages.config'
Successfully installed 'System.Composition 1.0.31' to CsToKotlinTranspiler
Adding package 'System.Numerics.Vectors.4.5.0' to folder 'E:\Projects\KotlinConverter\Project\packages'
Added package 'System.Numerics.Vectors.4.5.0' to folder 'E:\Projects\KotlinConverter\Project\packages'
Error downloading 'Microsoft.CodeAnalysis.VisualBasic.3.8.0 : Microsoft.CodeAnalysis.Common [3.8.0, 3.8.0]' from 'https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic/3.8.0/microsoft.codeanalysis.visualbasic.3.8.0.nupkg'.
Cannot access a disposed object.
Object name: 'SslStream'.
  GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic/3.8.0/microsoft.codeanalysis.visualbasic.3.8.0.nupkg
Install failed. Rolling back...
Package 'System.Numerics.Vectors.4.5.0' does not exist in project 'CsToKotlinTranspiler'
Removed package 'System.Composition.1.0.31 : System.Composition.AttributedModel [1.0.31, ), System.Composition.Convention [1.0.31, ), System.Composition.Hosting [1.0.31, ), System.Composition.Runtime [1.0.31, ), System.Composition.TypedParts [1.0.31, )' from 'packages.config'
Removed package 'System.Composition.TypedParts.1.0.31 : System.Composition.AttributedModel [1.0.31, ), System.Composition.Hosting [1.0.31, ), System.Composition.Runtime [1.0.31, )' from 'packages.config'
Removed package 'System.Composition.Hosting.1.0.31 : System.Composition.Runtime [1.0.31, )' from 'packages.config'
Removed package 'System.Composition.Runtime.1.0.31' from 'packages.config'
Removed package 'System.Composition.Convention.1.0.31 : System.Composition.AttributedModel [1.0.31, )' from 'packages.config'
Removed package 'System.Composition.AttributedModel.1.0.31' from 'packages.config'
Removed package 'System.Buffers.4.5.1' from 'packages.config'
Executing script file 'E:\Projects\KotlinConverter\Project\packages\Microsoft.CodeAnalysis.Analyzers.3.0.0\tools\uninstall.ps1'
Removed package 'Microsoft.CodeAnalysis.Analyzers.3.0.0' from 'packages.config'
Removed package 'Humanizer.Core.2.2.0' from 'packages.config'
Removing package 'System.Numerics.Vectors.4.5.0' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Numerics.Vectors.4.5.0' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Composition.1.0.31 : System.Composition.AttributedModel [1.0.31, ), System.Composition.Convention [1.0.31, ), System.Composition.Hosting [1.0.31, ), System.Composition.Runtime [1.0.31, ), System.Composition.TypedParts [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Composition.1.0.31 : System.Composition.AttributedModel [1.0.31, ), System.Composition.Convention [1.0.31, ), System.Composition.Hosting [1.0.31, ), System.Composition.Runtime [1.0.31, ), System.Composition.TypedParts [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Composition.TypedParts.1.0.31 : System.Composition.AttributedModel [1.0.31, ), System.Composition.Hosting [1.0.31, ), System.Composition.Runtime [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Composition.TypedParts.1.0.31 : System.Composition.AttributedModel [1.0.31, ), System.Composition.Hosting [1.0.31, ), System.Composition.Runtime [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Composition.Hosting.1.0.31 : System.Composition.Runtime [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Composition.Hosting.1.0.31 : System.Composition.Runtime [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Composition.Runtime.1.0.31' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Composition.Runtime.1.0.31' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Composition.Convention.1.0.31 : System.Composition.AttributedModel [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Composition.Convention.1.0.31 : System.Composition.AttributedModel [1.0.31, )' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Composition.AttributedModel.1.0.31' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Composition.AttributedModel.1.0.31' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'System.Buffers.4.5.1' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'System.Buffers.4.5.1' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'Microsoft.CodeAnalysis.Analyzers.3.0.0' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'Microsoft.CodeAnalysis.Analyzers.3.0.0' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removing package 'Humanizer.Core.2.2.0' from folder 'E:\Projects\KotlinConverter\Project\packages'
Removed package 'Humanizer.Core.2.2.0' from folder 'E:\Projects\KotlinConverter\Project\packages'
Executing nuget actions took 38.76 sec
Install-Package : Failed to add reference. The package 'System.Numerics.Vectors' tried to add a framework reference to 'System.Numerics' 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 Microsoft.CodeAnalysis -Version 3.8.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Time Elapsed: 00:01:46.3153626
Maybe-NSA commented 3 years ago

This can be resolved by installing System.Numerics.Vectors 4.5.0 prior to installing CodeAnalysis