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

dotnet restore with update in the new csproj/msbuild-based core projects? #4361

Closed
TheRealPiotrP opened this issue Jan 23, 2017 · 9 comments
Closed
Labels
Platform:Xplat Product:NuGet.exe NuGet.exe Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:DCR Design Change Request
Milestone

Comments

@TheRealPiotrP
Copy link

Moving from https://github.com/dotnet/cli/issues/5425 on behalf of @brgrz.

This is also related to #4358


How do I actually update the new csproj-based project's Nuget packages to the latest ones when using Visual Studio Code?

This is what I have within the .csproj file:

<PackageReference Include="Microsoft.AspNetCore" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.0.0" />

If I do dotnet restore it will only install the specified package versions.

There is no dotnet restore update or dotnet nuget update option available.

All of the above referenced Microsoft.AspNetCore.* packages have newer versions (1.1.0).

I would like to update the packages and have the references updated automatically in the same way we do this in Visual Studio.

@emgarten
Copy link
Member

@brgrz is this a question on Visual Studio Code? And is this the same as #4358?

@brgrz
Copy link

brgrz commented Jan 23, 2017

Yes, that's the issue I'm having. Pure VS Code environment.

@rrelyea
Copy link
Contributor

rrelyea commented Jan 23, 2017

There is no auto discovery of all updates that are available, yet.
#4358 covers having that added in future.

@mishra14 - can you please reply with the new syntax for "dotnet add package" if you know the version you want to upgrade to.

@mishra14
Copy link
Contributor

@brgrz : try using

  • dotnet add package Microsoft.AspNetCore -> This will update the package to its latest stable version
  • dotnet add package Microsoft.AspNetCore --version <version> -> This will update the package to the version that you specify

@brgrz
Copy link

brgrz commented Jan 24, 2017

thanks @mishra14 this is nice for in the meantime while we wait for #4358

@emgarten
Copy link
Member

this is nice for in the meantime while we wait for #4358

@brgrz any reason you need nuget.exe to do this also?

@brgrz
Copy link

brgrz commented Jan 24, 2017

@emgarten well this solution is not perfect and does not cover updating automatically to unknown new version and requires lots of typing

@rrelyea rrelyea added this to the 4.0.1 milestone Jan 27, 2017
@rrelyea
Copy link
Contributor

rrelyea commented Jan 27, 2017

Ensure that #4358 covers this scenario.

@rrelyea rrelyea added Product:NuGet.exe NuGet.exe Platform:Xplat Type:DCR Design Change Request labels Jan 27, 2017
@rrelyea rrelyea added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Feb 9, 2017
@rrelyea
Copy link
Contributor

rrelyea commented Feb 9, 2017

#4358 is in 4.0.1 right now. REsolving this as a dupe.

@rrelyea rrelyea closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform:Xplat Product:NuGet.exe NuGet.exe Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

5 participants