sdk icon indicating copy to clipboard operation
sdk copied to clipboard

error NU1001: The dependency * could not be resolved

Open eld1887 opened this issue 9 years ago • 5 comments

Steps to reproduce

dotnet, identityserver4 project in docker container (i hope thats the right board to post)

Expected behavior

succes

Actual behavior

error

Environment data

dotnet --info output:`

identityserver2 | Project dotnetapp (.NETCoreApp,Version=v1.1) will be compiled because inputs were modified identityserver2 | Compiling dotnetapp for .NETCoreApp,Version=v1.1 identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency IdentityModel >= 2.1.1 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency IdentityServer4 >= 1.0.0-rc5 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency Microsoft.AspNetCore.Authentication >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency Microsoft.AspNetCore.Authentication.Cookies >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency Microsoft.AspNetCore.Cors >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency Microsoft.AspNetCore.Cryptography.Internal >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency Microsoft.AspNetCore.DataProtection >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(7,34): error NU1001: The dependency Microsoft.AspNetCore.DataProtection.Abstractions >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(8,47): error NU1001: The dependency Microsoft.AspNetCore.Diagnostics >= 1.1.* could not be resolved. identityserver2 | /dotnetapp/project.json(8,47): error NU1001: The dependency Microsoft.AspNetCore.Diagnostics.Abstractions >= 1.1.0 could not be resolved. identityserver2 | /dotnetapp/project.json(10,50): error NU1001: The dependency Microsoft.AspNetCore.Hosting >= 1.1.0 could not be resolved.

and so on

project.json file:

{
  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.*",
      "type": "platform"
    },
    "IdentityServer4": "1.0.0-rc5",
    "Microsoft.AspNetCore.Diagnostics": "1.1.*",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.*",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.*",
    "Microsoft.Extensions.Logging.Console": "1.1.*"
  },

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

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

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

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

  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

Hope someone can help

eld1887 avatar Feb 01 '17 18:02 eld1887

@andreasjaeckel so this happens on restore, right? That error means that the dependencies were not able to be resolved. Is your NuGet.config configured properly? Also, do you have network access from the Docker container?

thesmithee avatar Feb 01 '17 18:02 thesmithee

hi,

thanks for your answer. this is my NuGet.config: i think this one is a standard?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSource>
        <clear />
        <add key="NuGet" value="https://api.nuget.org/v3/index.json" />
    </packageSource>

</configuration>

normally i had network access for the docker container. is there any chance to see it? Sorry for the dumb questions, i´m new to this topic.

eld1887 avatar Feb 01 '17 18:02 eld1887

the bottom portion of the nuget restore output would be useful. I'm curious what feeds it's actually attempting to talk to.

TheRealPiotrP avatar Feb 06 '17 08:02 TheRealPiotrP

Closing this due to the lack of activity and the fact we need more information.

livarcocc avatar Feb 27 '17 18:02 livarcocc

I came to the same problem and it seems to be miraculously fix when I add <ReferenceOutputAssembly></ReferenceOutputAssembly> inside the .csproj file for which assembly is causing the error.

theCuriousOne avatar Jul 20 '17 15:07 theCuriousOne