C sharp - Como hacer un paquete NuGet compatible con .NET Framework/Standard/Core?

 
Vista:

Como hacer un paquete NuGet compatible con .NET Framework/Standard/Core?

Publicado por Raul Marquez (1 intervención) el 12/04/2020 04:53:10
Hola a todos,

He estado haciendo mi paquete NuGet apenas unos dias.

Es este: https://www.nuget.org/packages/ExcelFromList/1.4.0

Internamente utilizo al packete de EPPlus, el cual especifica que es compatible con los 3 estandares y al probarlo es correcot.

Solo que no se como se hace eso.

Esta es la informacion de mi proyecto:

.NET 3.5
Uso nuget.exe para crear el paquete NuGet
Uso archivo .nuspec para crear el paquete (nuget pack <.nuspec file>)
El unico paquete NuGet que tengo instalado es EPPLus

Este es mi archivo .nuspec:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?xml version="1.0" encoding="utf-8" ?>
<package>
  <metadata>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <id>ExcelFromList</id>
    <version>1.0.4</version>
    <title>ExcelFromList</title>
    <description>Straightforward and easy way to create stylized excel workbooks from lists. Add an image, title, subtitles and overal cell styles/formats. Uses the EPPlus engine.</description>
    <releaseNotes>Succesfully tested on .NET frameworks from 3.5 through 4.8</releaseNotes>
    <authors>Raul Marquez</authors>
    <owners>Raul Marquez</owners>
    <copyright>Copyright 2020 Raul Marquez</copyright>
    <projectUrl>https://github.com/RaulMarquezInclan/ExcelFromList</projectUrl>
    <license type="expression">GPL-3.0-only</license>
    <tags>excel list listtoexcel</tags>
 
    <dependencies>
      <dependency id="EPPlus" version="5.1.0" />
    </dependencies>
 
  </metadata>
 
  <files>
    <file src="bin\Debug\net35\ExcelFromList.dll" target="lib\net35" />
    <file src="bin\Debug\net35\ExcelFromList.xml" target="lib\net35" />
  </files>
</package>

Al crear el paquete me arroja este warning:

WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below: - Add a dependency group for .NETFramework3.5 to the nuspec

Pero aun asi no he encontrado problema alguno.

Alguien me puede apuntar el la direccion correcta?

Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder