error NU1001: The dependency Microsoft.NETCore.App >= 1.0.1 could not be resolved
See original GitHub issueSteps 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:
- Created 7 years ago
- Comments:7
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.
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-”,