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

IVsPackageInstaller.InstallPackage fails to install package from source not included in NuGet.config #7104

Open
sgreenmsft opened this issue Jul 9, 2018 · 2 comments
Assignees
Labels
Functionality:SDK The NuGet client packages published to nuget.org Priority:2 Issues for the current backlog. Product:VS.Client Style:PackageReference Type:Feature
Milestone

Comments

@sgreenmsft
Copy link

In VS2017 15.7.4, calling IVsPackageInstaller.InstallPackage with an on-disk source fails.

Steps to reproduce the behavior:
(1) Find or create a nupkg that's not available in any package source specified in %appdata%\nuget\nuget.config.
(2) nuget.exe add that nupkg to C:\temp\packages.
(3) Ensure that C:\temp\packages is not a package source listed in %appdata%\nuget\nuget.config.
(4) Create an ASP.NET Core web application project (targeting .NET Core 2.0).
(5) Author a VS extension to call IVsPackageInstaller.InstallPackage with source="C:\temp\packages" and project=the project created in (4).
(6) Run the VS extension.

Expected result:
Nuget finds and installs the package from C:\temp\packages.

Actual result:
Nuget fails to find the package and the operation fails with an exception - "Package restore failed. Rolling back package changes for 'Web1'." The LogMessage will show that it was unable to find the package and will show that it searched every package source in %appdata%\nuget\nuget.config.

@PatoBeltran PatoBeltran added Product:VS.Client Priority:2 Issues for the current backlog. NuGet API labels Jul 13, 2018
@PatoBeltran PatoBeltran added this to the Backlog milestone Jul 13, 2018
@jainaashish jainaashish changed the title IVsPackageInstaller.InstallPackage fails to install package from source on disk IVsPackageInstaller.InstallPackage fails to install package from source not included in NuGet.config Jan 22, 2019
@jainaashish jainaashish self-assigned this Jan 23, 2019
@jainaashish jainaashish modified the milestones: Backlog, 5.0 Jan 23, 2019
@rrelyea rrelyea assigned nkolev92 and unassigned jainaashish Feb 11, 2019
@rrelyea
Copy link
Contributor

rrelyea commented Feb 11, 2019

consider right fix or not?
5.0 or later?

@nkolev92 nkolev92 modified the milestones: 5.0, 5.1 Feb 14, 2019
@nkolev92
Copy link
Member

@rrelyea rrelyea modified the milestones: 5.1, 5.2 Apr 30, 2019
@nkolev92 nkolev92 modified the milestones: 5.2, 5.3 Jul 1, 2019
@nkolev92 nkolev92 modified the milestones: 5.3, Backlog Aug 21, 2019
@nkolev92 nkolev92 added Functionality:SDK The NuGet client packages published to nuget.org and removed NuGet API labels Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:SDK The NuGet client packages published to nuget.org Priority:2 Issues for the current backlog. Product:VS.Client Style:PackageReference Type:Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants