Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Conflict between VS2015 NuGet and PowerShell provider #107

@mjyeaney

Description

@mjyeaney

Cross-posted from OneGet repo issue here: OneGet/oneget#274

VS Environment:

VS2015 Community, v.14.0.25431.01, Update 3
NuGet Package Manager for VS2015, v.3.5.0.1484

Powershell Environment:

PSVersion                      5.1.14393.953
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.953
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Powershell Package Providers:

NuGet Provider, v.2.8.5.208
PowerShellGet, v.1.1.2.0

Package Source Locations:

nuget.org - https://api.nuget.org/v3/index.json
PSGallery - https://www.powershellgallery.com/api/v2/

Given the above configuration, VS2015 is able to browse NuGet packages without issue. PowerShell, however, is unable to search the NuGet repositories due to incorrect location URL (api v3). This results in the following HTTP trace when executing Find-Package from a PowerShell Session:

fiddler-error

(Sidenote - what's with the request for "Foobar" to the Powershell Gallery?)

Now, change the NuGet location in for the PowerShell NuGet provider to the correct api v2 and restart the PowerShell session:

Set-PackageSource -name nuget-org -NewLocation https://www.nuget.org/api/v2

PowerShell is now able to search NuGet repositories correctly - but note that VS2015 (after restart) is now broken:

[nuget.org] Unable to load the service index for source https://www.nuget.org/api/v2.
  The content at 'https://www.nuget.org/api/v2' is not a valid JSON object.
  Unexpected character encountered while parsing value: <. Path '', line 0, position 0.

vs-nuget-error

While I'm aware OneGet doesn't currently support the NuGet API v3, it seems unexpected that it would break other applications (i.e., VS).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions