c# - How to specify dependency of netcoreapp1.0 on local nuget package? -
i'm working latest release of .net core 1.0 (dotnet-dev-1.0.0-preview2-003121
) under ubuntu 16.04 lts.
i have local shared library written under mono ported .net core (netstandard 1.6) , use dotnet pack
produce .nupkg
, .symbols.nupkg
.
now create netcoreapp1.0
using dotnet new
, how can write dependencies
in project.json
add local dll or nuget package references, adding dll
reference in vs/mono previously?
i read .net core rc2 using own local nuget package: folder netstandard1.5 contains invalid version seems not solve problem.
you need tell dotnet
can find nuget package. can using nuget.config file, either local 1 or global one.
to set directory package source locally, create file named nuget.config file in project directory, or 1 of directories directory tree it, containing like:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packagesources> <add key="my-local-source" value="path/to/your/local/source" /> </packagesources> </configuration>
to set package source globally, change global nuget.config file instead. on linux, location ~/.nuget/nuget/nuget.config
.
Comments
Post a Comment