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.

Microsoft.NETCore.App cannot be restored on projects with netstandard1.0, netstandard1.1, netstandard1.2, netstandard1.3, netstandard1.4.

See original GitHub issue

Expectations

Microsoft.NETCore.App currently targets netstandard1.0 which lead me to believe it’d be possible (although not recommended) to use it in a >= netstandard1.0 project. However, it seems that the package is hand crafted and has dependencies that are inconsistent with its actual TFM.

Steps to reproduce

  • Create a project with the project.json:
{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-*"
    }
  },
  "frameworks": {
    "netstandard1.0": {
      "dependencies": {}
    }
  }
}

You can can change the netstandard1.0 tfm to 1.1, 1.2, 1.3 or 1.4 and get the same behavior

  • Run dotnet restore

Expected behavior

  • Restore completes successfully because Microsoft.NETCore.App’s nupkg says it targets netstandard1.0.

Actual behavior

  • Restore fails because Microsoft.NETCore.App actually targets packages that depend on netstandard1.5

Attached error log: restoreerror.txt

Environment data

.NET Command Line Tools (1.0.0-rc2-002678)

Product Information: Version: 1.0.0-rc2-002678 Commit Sha: 3b2ea9d14b

Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64

This seems like a blocker since the Microsoft.NETCore.App is the bread and butter to .NET core but I’ll let the higher powers decide.

/cc @Eilon @DamianEdwards @davidfowl

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
brthorcommented, May 6, 2016

@NTaylorMullen deleted the comment right after I posted it, since I realized this issue was not about quite the same thing. 😄

0reactions
guardrexcommented, May 10, 2016

@joganet That’s correct. You do have the TFM’s correct. My packages are netstandard1.5, and my apps are netcoreapp1.0. Yeah … unfreeze and perhaps check for lingering old SDK’s and dotnet cli’s in Programs & Features.

Worst case scenario is that you’ll have to put up a repro so that a MS dev can pull it down and see what’s what with the problem. They’re monitoring our conversation 👀, and when they don’t jump in quickly, it usually means that they are waiting to see if the ordinary troubleshooting advice works or fails. The next step will be ‘please give us a GH repro … a lib and an app that we can test.’

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.NETCore.App cannot be restored on projects with ...
Expectations Microsoft.NETCore.App currently targets netstandard1.0 which lead me to believe it'd be possible (although not recommended) to ...
Read more >
Netstandard1.x Nuget packages cannot be installed for ...
Package restore failed for 'ClassLibrary1'. I created the project ClassLibrary1 as a portable class library, change the target to netstandard1.3 ...
Read more >
NuGet Error NU1201
Solution. Change the project's target framework to an equal or lower version than the consuming project. Example 2 - NetStandard targetted ...
Read more >
NET Standard
NET Standard 1.x is distributed as a granular set of NuGet packages, which creates a large package dependency graph and results in developers ......
Read more >
Visual Studio 2022 Projects fails to build because it cannot ...
One of my Visual Studio 2022 Projects fails to build because it cannot copy a dependency from the local .nuget directory.
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