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

--interactive support for dotnet remove package #7727

Closed
wli3 opened this issue Jan 23, 2019 · 8 comments · Fixed by NuGet/NuGet.Client#2704
Closed

--interactive support for dotnet remove package #7727

wli3 opened this issue Jan 23, 2019 · 8 comments · Fixed by NuGet/NuGet.Client#2704

Comments

@wli3
Copy link

wli3 commented Jan 23, 2019

These 2 commands in CLI are just a redirect command to nuget.xplat.

If there is a project used a msbuild sdk that is in a private nuget feed. These 2 commands will fail. At the same time, dotnet add package with --interactive will succeed. So doing the similar work for dotnet add package should resolve the problem.

info : Removing PackageReference for package 'testclasslib' from project '/Users/williamli/Documents/restoreauthproject/restoreauthproject.csproj'.
error: The SDK 'wul.testmsbuildsdk/2.0.1' specified could not be found.  /Users/williamli/Documents/restoreauthproject/restoreauthproject.csproj

csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <Sdk Name="wul.testmsbuildsdk" Version="2.0.1" />

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>
</Project>
@wli3
Copy link
Author

wli3 commented Jan 23, 2019

@rrelyea @nkolev92

@nkolev92
Copy link
Member

nkolev92 commented Jan 23, 2019

The list part is duplicate of #7605.

The NuGet side fix is done, but not the CLI one.

I can do the remove package reference one.

@wli3
Do you plan on addressing the CLI side of these or do you want us to do it?

@nkolev92
Copy link
Member

@wli3

Also in the title you talk about list and remove, but in the issue you talk about MSBUIlD SDKs as well.

The MSBuild SDKs scenario has been addressed in NuGet/NuGet.Client@62916a4#diff-2cd243ce1cd32fce987422c201afe90d

@wli3
Copy link
Author

wli3 commented Jan 24, 2019

#7605 and relation to msbuild sdk

I don't think it is the same as NuGet/NuGet.Client@62916a4#diff-2cd243ce1cd32fce987422c201afe90d.

This issue more tricky. For #7605, if a feed is behind private feed. At least it can pass msbuild evaluation phase. But if there is an msbuild sdk behind private feed. Even the evaluation will fail. I am not sure the implementation of nuget auth. The solution of 7605 may work for msbuild sdk as well, but please double check this scenario.

Do you plan on addressing the CLI side of these or do you want us to do it?

I am not familiar with the redirect to nuget code in CLI. It would be nice for you to also address the code on CLI side.

@nkolev92
Copy link
Member

@wli3

The fix that I did for #7605 is already in the sdk resolver.
The NuGet plumbing is complete there. The rest is the msbuild sdk resolver magic, which we don't really understand.

@nkolev92
Copy link
Member

@wli3
The scenario wasn't clear to me when I commented last time.

I will do the change on NuGet side, and I'll try to work with you to validate it correctly.

I assume the remove package reference addition can target 2.1.6xx, while the dotnet list package one can target 2.2.2xx?

@nkolev92 nkolev92 changed the title --interactive support for dotnet remove package and dotnet list package --interactive support for dotnet remove package Jan 30, 2019
@wli3
Copy link
Author

wli3 commented Jan 30, 2019

@nkolev92 2.1.6xx and 2.2.2xx is not necessary since "--interactive in most commands" are in 3.0.1xx. But is also ok to add it.

@nkolev92
Copy link
Member

Both PRs are out.

dotnet/cli#10674

@wli3 We should clarify with the PMs + Rob if the the RemovePackageReference --interactive is something that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment