Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-Package fails claiming newer version already installed, till I tap the right package #736

Closed
AArnott opened this issue Jun 7, 2015 · 1 comment
Assignees
Labels
Priority:2 Issues for the current backlog. Product:VS.Client
Milestone

Comments

@AArnott
Copy link
Contributor

AArnott commented Jun 7, 2015

NuGet Update-Package fails claiming that a newer package is already installed, until I pick "just the right package" to try to update, after which it all succeeds.

Visual Studio D14Rel 23004.00
NuGet version 3.0.60526.427

Execute these commands:

git clone  https://github.com/AArnott/StyleCopAnalyzers.git
cd StyleCopAnalyzers
git checkout afdc12e6709def9decc62af2a3b2379ed4364eb3
StyleCopAnalyzers.sln

In Visual Studio, add this URL as a NuGet package source:
https://www.myget.org/F/roslyn-nightly/
In total, and in order, package sources I have enabled are:
https://www.myget.org/F/aarnott/api/v2
https://api.nuget.org/v3/index.json
https://www.myget.org/F/aarnott/api/v2
https://www.myget.org/F/roslyn-nightly/

Use the Package Manager Console to execute this command:

PM> update-package microsoft.codeanalysis.common -pre
Attempting to gather dependencies information for package 'microsoft.codeanalysis.common.1.0.0-rc3-20150605-02' with respect to project 'StyleCop.Analyzers.Test', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'microsoft.codeanalysis.common.1.0.0-rc3-20150605-02' with DependencyBehavior 'Lowest'
Resolving actions to install package 'microsoft.codeanalysis.common.1.0.0-rc3-20150605-02'
update-package : Already referencing a newer version of 'Microsoft.CodeAnalysis.CSharp'..
At line:1 char:1
+ update-package microsoft.codeanalysis.common -pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

PM> update-package microsoft.codeanalysis.common -pre
Attempting to gather dependencies information for package 'microsoft.codeanalysis.common.1.0.0-rc3-20150605-02' with respect to project 'StyleCop.Analyzers.Test', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'microsoft.codeanalysis.common.1.0.0-rc3-20150605-02' with DependencyBehavior 'Lowest'
Resolving actions to install package 'microsoft.codeanalysis.common.1.0.0-rc3-20150605-02'
update-package : Already referencing a newer version of 'Microsoft.CodeAnalysis.CSharp'..
At line:1 char:1
+ update-package microsoft.codeanalysis.common -pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

PM> update-package microsoft.codeanalysis.csharp -pre
Attempting to gather dependencies information for package 'microsoft.codeanalysis.csharp.1.0.0-rc3-20150605-02' with respect to project 'StyleCop.Analyzers.Test', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'microsoft.codeanalysis.csharp.1.0.0-rc3-20150605-02' with DependencyBehavior 'Lowest'
Resolving actions to install package 'microsoft.codeanalysis.csharp.1.0.0-rc3-20150605-02'
update-package : Already referencing a newer version of 'Microsoft.CodeAnalysis.CSharp.Workspaces'..
At line:1 char:1
+ update-package microsoft.codeanalysis.csharp -pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

PM> update-package microsoft.codeanalysis.csharp.workspaces -pre
Attempting to gather dependencies information for package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02' with respect to project 'StyleCop.Analyzers.Test', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02' with DependencyBehavior 'Lowest'
Resolving actions to install package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02'
Resolved actions to install package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02'
Removed package 'Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01' from 'packages.config'
Executing script file 'C:\Users\andarno\git\StyleCopAnalyzers\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01\tools\uninstall.ps1'
Successfully uninstalled 'Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.Test.
Removed package 'Microsoft.CodeAnalysis.Common.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.Common.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.Test.
Removed package 'Microsoft.CodeAnalysis.CSharp.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.CSharp.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.Test.
Removed package 'Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.Test.
Removed package 'Microsoft.CodeAnalysis.Workspaces.Common.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.Workspaces.Common.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.Test.
Removed package 'System.Collections.Immutable.1.1.34-rc' from 'packages.config'
Successfully uninstalled 'System.Collections.Immutable.1.1.34-rc' from StyleCop.Analyzers.Test.
Removed package 'System.Reflection.Metadata.1.0.19-rc' from 'packages.config'
Successfully uninstalled 'System.Reflection.Metadata.1.0.19-rc' from StyleCop.Analyzers.Test.
Adding package 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' to 'packages.config'
Executing script file 'C:\Users\andarno\git\StyleCopAnalyzers\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0-rc3-20150605-02\tools\install.ps1'
Successfully installed 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.Test.
Adding package 'System.Collections.Immutable 1.1.36' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'System.Collections.Immutable 1.1.36' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'System.Collections.Immutable 1.1.36' to 'packages.config'
Successfully installed 'System.Collections.Immutable 1.1.36' to StyleCop.Analyzers.Test.
Adding package 'System.Reflection.Metadata 1.0.21' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'System.Reflection.Metadata 1.0.21' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'System.Reflection.Metadata 1.0.21' to 'packages.config'
Successfully installed 'System.Reflection.Metadata 1.0.21' to StyleCop.Analyzers.Test.
Adding package 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.Test.
Adding package 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.Test.
Adding package 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.Test.
Adding package 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' to folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.Test.
Attempting to gather dependencies information for package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02' with respect to project 'StyleCop.Analyzers', targeting '.NETPortable,Version=v4.5,Profile=Profile7'
Attempting to resolve dependencies for package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02' with DependencyBehavior 'Lowest'
Resolving actions to install package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02'
Resolved actions to install package 'microsoft.codeanalysis.csharp.workspaces.1.0.0-rc3-20150605-02'
Removed package 'Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01' from 'packages.config'
Executing script file 'C:\Users\andarno\git\StyleCopAnalyzers\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01\tools\uninstall.ps1'
Successfully uninstalled 'Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.
Removed package 'Microsoft.CodeAnalysis.Common.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.Common.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.
Removed package 'Microsoft.CodeAnalysis.CSharp.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.CSharp.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.
Removed package 'Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.
Removed package 'Microsoft.CodeAnalysis.Workspaces.Common.1.0.0-rc2-20150418-01' from 'packages.config'
Successfully uninstalled 'Microsoft.CodeAnalysis.Workspaces.Common.1.0.0-rc2-20150418-01' from StyleCop.Analyzers.
Removed package 'System.Collections.Immutable.1.1.34-rc' from 'packages.config'
Successfully uninstalled 'System.Collections.Immutable.1.1.34-rc' from StyleCop.Analyzers.
Removed package 'System.Reflection.Metadata.1.0.19-rc' from 'packages.config'
Successfully uninstalled 'System.Reflection.Metadata.1.0.19-rc' from StyleCop.Analyzers.
Package 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' to 'packages.config'
Executing script file 'C:\Users\andarno\git\StyleCopAnalyzers\packages\Microsoft.CodeAnalysis.Analyzers.1.0.0-rc3-20150605-02\tools\install.ps1'
Successfully installed 'Microsoft.CodeAnalysis.Analyzers 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.
Package 'System.Collections.Immutable 1.1.36' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'System.Collections.Immutable 1.1.36' to 'packages.config'
Successfully installed 'System.Collections.Immutable 1.1.36' to StyleCop.Analyzers.
Package 'System.Reflection.Metadata 1.0.21' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'System.Reflection.Metadata 1.0.21' to 'packages.config'
Successfully installed 'System.Reflection.Metadata 1.0.21' to StyleCop.Analyzers.
Package 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.Common 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.
Package 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.CSharp 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.
Package 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.Workspaces.Common 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.
Package 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' already exists in folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Added package 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' to 'packages.config'
Successfully installed 'Microsoft.CodeAnalysis.CSharp.Workspaces 1.0.0-rc3-20150605-02' to StyleCop.Analyzers.
Removing package 'Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removed package 'Microsoft.CodeAnalysis.Analyzers.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removing package 'Microsoft.CodeAnalysis.Common.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Access to the path 'Microsoft.CodeAnalysis.xml' is denied.
Removed package 'Microsoft.CodeAnalysis.Common.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removing package 'Microsoft.CodeAnalysis.CSharp.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removed package 'Microsoft.CodeAnalysis.CSharp.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removing package 'Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removed package 'Microsoft.CodeAnalysis.CSharp.Workspaces.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removing package 'Microsoft.CodeAnalysis.Workspaces.Common.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removed package 'Microsoft.CodeAnalysis.Workspaces.Common.1.0.0-rc2-20150418-01' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removing package 'System.Collections.Immutable.1.1.34-rc' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removed package 'System.Collections.Immutable.1.1.34-rc' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removing package 'System.Reflection.Metadata.1.0.19-rc' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
Removed package 'System.Reflection.Metadata.1.0.19-rc' from folder 'C:\Users\andarno\git\StyleCopAnalyzers\packages'
PM> 
@yishaigalatzer yishaigalatzer added this to the 3.0.0-RTM milestone Jun 8, 2015
@yishaigalatzer yishaigalatzer added Product:VS.Client Priority:2 Issues for the current backlog. labels Jun 8, 2015
@johnataylor
Copy link
Member

update-package should be working correctly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:2 Issues for the current backlog. Product:VS.Client
Projects
None yet
Development

No branches or pull requests

3 participants