question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Explicit restore for self-contained app behaves differently than implicit restore

See original GitHub issue

Steps to reproduce

  1. mkdir ExplicitRestore

  2. cd ExplicitRestore

  3. dotnet new console --no-restore

  4. dotnet restore -r debian.8-x64 Inspect the obj/project.assets.json to see what version of Microsoft.NETCore.App is used - Microsoft.NETCore.App/2.0.0

  5. mkdir ImplicitRestore

  6. cd ImplicitRestore

  7. dotnet new console --no-restore

  8. dotnet build -r debian.8-x64 The build step fails - notice the version of Microsoft.NETCore.App being used - ‘’’ /ImplicitRestore/ImplicitRestore.csproj : error NU1102: Unable to find package Microsoft.NETCore.App with version (>= 2.0.1) /ImplicitRestore/ImplicitRestore.csproj : error NU1102: - Found 14 version(s) in nuget.org [ Nearest version: 2.0.0 ] ‘’’

Expected behavior

I was expecting the two scenarios to behave the same. Specifically I would expect them to be using the same version of Microsoft.NETCore.App - 2.0.1

Actual behavior

Explicit restore uses Microsoft.NETCore.App 2.0.0 while the implicit restore uses 2.0.1.

Environment data

dotnet --info output:

.NET Command Line Tools (2.0.1-servicing-006955)

Product Information:
 Version:            2.0.1-servicing-006955
 Commit SHA-1 hash:  6734510020

Runtime Environment:
 OS Name:     debian
 OS Version:  8
 OS Platform: Linux
 RID:         debian.8-x64
 Base Path:   /usr/share/dotnet/sdk/2.0.1-servicing-006955/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.1
  Build    : 5eb2f9bd659ad2161a8e035ac4bccd8f892caa0a

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
livarcocccommented, Feb 16, 2018

32bit linux is not supported.

1reaction
nguerreracommented, Sep 12, 2017

NOTE: We are opting not to bump implicit versions for self contained apps until we address this.

cc @richlander @KathleenDollard

This should no longer repro with the steps above when https://github.com/dotnet/cli/pull/7632 is merged. Should we keep this open to track design changes to this or file something new?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot publish a self-contained dotnet-core application ...
It seems like nuget restore command for your application can't restore some packages. There are many reasons for that, but you can do...
Read more >
Runtime-specific apps no longer self-contained - .NET
Learn about a breaking change in the .NET 8 SDK where apps that specify a runtime identifier are no longer self-contained by default....
Read more >
Database Backup and Recovery Reference
Imports the metadata from one recovery catalog into a different recovery catalog. ... string either explicitly or implicitly within %U.
Read more >
International Views of the Superpowers
YET THERE ARE SOLID grounds for regarding the Gorbachev proposals in a different light from earlier Soviet disarmament diplomacy.
Read more >
Trinity+twenty-five years - Jun 1970 - Page 2 - Google Books Result
Evolution has favored the division of mankind into self-contained, self-centered ... (I wish it complete recovery from this disease through many years of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found