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.

error NU1001: The dependency Microsoft.NETCore.App >= 1.0.1 could not be resolved

See original GitHub issue

Steps to reproduce

Install ASP.NET Core + Angular 2 template for Visual Studio, create a new project with that template, then build the project.

Expected behavior

Finish building successfully.

Actual behavior

Failure

Environment data

dotnet --info output: project.json(3,30): error NU1001: The dependency Microsoft.NETCore.App >= 1.0.1 could not be resolved. project.json(10,41): error NU1001: The dependency Microsoft.NETCore.App >= 1.0.1 could not be resolved. project.json(3,30): error NU1001: The dependency Microsoft.NETCore.App >= 1.0.0 could not be resolved. project.json(10,41): error NU1001: The dependency Microsoft.NETCore.App >= 1.0.0 could not be resolved. project.json(7,53): error NU1001: The dependency Microsoft.AspNetCore.AngularServices >= 1.0.0-* could not be resolved. project.json(9,39): error NU1001: The dependency Microsoft.AspNetCore.Mvc >= 1.0.1 could not be resolved. project.json(15,50): error NU1001: The dependency Microsoft.AspNetCore.Server.Kestrel >= 1.0.1 could not be resolved. project.json(19,61): error NU1001: The dependency Microsoft.Extensions.Configuration.CommandLine >= 1.0.0 could not be resolved.

The following is the project.json:

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.0.1",
      "type": "platform"
    },
    "Microsoft.AspNetCore.AngularServices": "1.0.0-*",
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.Mvc": "1.0.1",
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.0.0-preview2-final",
      "type": "build"
    },
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
    "Microsoft.Extensions.Configuration.Json": "1.0.0",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
    "Microsoft.Extensions.Logging": "1.0.0",
    "Microsoft.Extensions.Logging.Console": "1.0.0",
    "Microsoft.Extensions.Logging.Debug": "1.0.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0"
  },

  "tools": {
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final",
    "Microsoft.DotNet.Watcher.Tools": "1.0.0-preview2-final"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "appsettings.json",
      "ClientApp/dist",
      "node_modules",
      "Views",
      "web.config",
      "wwwroot"
    ]
  },

  "scripts": {
    "prepublish": [
      "npm install",
      "node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod",
      "node node_modules/webpack/bin/webpack.js --env.prod"
    ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  },

  "tooling": {
    "defaultNamespace": "Color_Vision_Test_Angular"
  }
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

4reactions
adrobsoncommented, Feb 14, 2017

Don’t forget to try Restore Packages (right mouse click on project) !!. I had seemingly endless problems as the template kept failing upon first load. There were always two packages that failed - Microsoft.Extensions.Configuration.CommandLine and Microsoft.AspNetCore.AngularServices. After a dozen uninstall and install of the dotnetcore framework and tools and a few reinstalls of Visual Studio the situation had not changed. I finally tried right mouse clicking on the project and selecting Restore Packages. It then worked. I’m not sure if anything else I did along the way actually changed anything.

2reactions
litoshkocommented, Dec 22, 2016

I ran into the same issue. I managed to successfully restore packages and build the project by changing one line in project.json: line 7: “Microsoft.AspNetCore.AngularServices”: “1.0.0-", to the following: “Microsoft.AspNetCore.AngularServices”: "1.0.0-beta-”,

Read more comments on GitHub >

github_iconTop Results From Across the Web

NU1001 The dependency Microsoft...>=1.0.0 could not be ...
my Problem is: Today i open my App in Visual Studio 2015 but there was an ERROR by the References about: NU1001 The...
Read more >
error NU1001: The dependency Microsoft.NETCore.App >= ...
dotnet --info output: project.json(3,30): error NU1001: The dependency Microsoft.NETCore.App >= 1.0.1 could not be resolved.
Read more >
error NU1001: The dependency * could not be resolved
NETCoreApp,Version=v1.1) will be compiled because inputs were modified identityserver2 | Compiling dotnetapp for .NETCoreApp,Version=v1.1 ...
Read more >
NuGet Error NU1100
A dependency could not be resolved. This is a generic issue for types that are not packages or projects. Solution 1. Open the...
Read more >
NuGet Error NU1101
Solution. Examine the project's dependencies in Visual Studio to be sure you're using the correct package identifier and version number. Check ...
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