I have a .Net Core library project which i want to share with all our other projects. These other projects are developed in Classic 4.6.2 and ASP.NET Core. I want to share it using Nuget package. Since package needs to be private i will be hosting it on our server. The .net core library project i am trying to publish has the following project.json
{
"version": "1.0.0-*",
"dependencies": {
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
}
}
I followed these guidelines [here][1] to create a package
- Created the .nuspec package manifest file using
nuget spec
command - Updated nuspec file as per the suggestion
- Tried creating package with command
nuget pack MyProject.xproj
got error
Please specify a nuspec or project file to use.
Looks like nuget does not recognize xproj So executed command
nuget pack MyProject.nuspec
got warning
WARNING: 2 issue(s) found with package 'MyId'.
Issue: Assembly outside lib folder. Description: The assembly 'bin\Debug\netstandard1.6\MyProject.dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project. Solution: Move it into the 'lib' folder if it should be referenced.
Issue: Assembly outside lib folder. Description: The assembly 'bin\Release\netstandard1.6\MyProject.dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project. Solution: Move it into the 'lib' folder if it should be referenced.
I have already already looked SO post [here][2] and [here][3] but it couldn't solve my issue
dotnet pack
? – Thomasnupkg
file into packages folder and build the solution it didnt create the packages as mentioned – LP13