c# - Unable to restore a nuget of .net core class lib into another -


i trying create nuget class library want consumed across different applications. class library in .net core (4.5.1 framework).

adding new class lib

the project.json looks below:

    {   "version": "1.0.0",    "dependencies": {     "netstandard.library": "1.6.0",     "microsoft.aspnetcore.diagnostics.abstractions": "1.0.0",     "microsoft.aspnetcore.http": "1.0.0",     "log4net": "2.0.8"   },    "description": "logging .net core",    "frameworks": {     "netstandard1.6": {       "imports": [ "dnxcore50" ]     }   } } 

i build class library , create nuget package , put in internal repository. created nuget package using 2 different ways:

  1. create .nuspec file( command : nuget spec) , pack .nuspec file (command nuget pack projectname.nuspec) -> results in .nupkg file
  2. command : dotnet pack project.json -> results in .nupkg , .sysmbols.nupkg files

when try restore package repo application, error : nuget created method 1 :

 package testlib 1.0.0 not compatible netstandard1.6 (.netstandard,version=v1.6). package testlib 1.0.0 supports: net (.netframework,version=v0.0)     1 or more packages incompatible .netstandard,version=v1.6. 

when looked references tree in solution explorer, see error on referenced class library package message :

nu1002 dependency testlib not support framework .netstandard, version =v1.6 

for method 2:

restore successful, not get/use classes library. empty dll reference.

the project.json of application simple , straight.

{   "version": "1.0.0-*",   "buildoptions": {     "emitentrypoint": true   },    "dependencies": {     "microsoft.netcore.app": {       "type": "platform",       "version": "1.0.1"     },     "testlib": "1.0.0"   },    "frameworks": {     "netcoreapp1.0": {       "imports": "dnxcore50"     }   } } 

i going clue less why behaviour!! why not able restore .net core library nuget another. tried restoring . net core console application, .net core web application same results.

i using vs2015 enterprise edition .netcore tools preview 2


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -