I
I
Igor Kravchenko2016-08-17 09:51:52
.NET
Igor Kravchenko, 2016-08-17 09:51:52

What is the correct way to add netstandard(.net core) support to the library(nuget package)?

There is a c# library provided by nuget package with source on github, for example https://github.com/graffen/NLog.Targets.Syslog , but it doesn't support .net core, what is the right way to add .net core support?
1) need to add .sln?
2)need to add a new project?
3) Add a dependency on which version of netstandard? (1.0, 1.3, 1.6)
4) fix builds?
5) fix the configs (which ones)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Kravchenko, 2016-08-18
@Gorniv

My github commit , I added new sln and new .net core dll, removed everything except project.json in the project.
To copy data from the main project, use:

"buildOptions": {
     "compile": {
       "include": [ "../NLog.Targets.Syslog/**/*.cs" ]
     },
     "warningsAsErrors": false,
     "outputName": "NLog.Targets.Syslog",
     "xmlDoc": true
   },

put in code
#if NET45
#if NETSTANDARD1_6

Nuget settings are correct in the .nuspec settings commit , I didn’t do the settings correctly to the end, I don’t know how to correctly indicate that the package will be pre-release =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question