What does it mean "put nuspec file into your output folder with the correct format" ?

  • Thread starter Thread starter Bhadurudeen
  • Start date Start date
B

Bhadurudeen

Guest
I have developed a NuGet package to consume in my Universal Windows Platform apps. I followed this documentation. I first created a new/empty Windows Runtime Component (Universal Windows), then added a class library project (Universal Windows) to that. Then created a nuspec file, with nuget spec command. Then added required dependecies and files like below.


<metadata>
<!--some-->

<dependencies>
<group targetFramework="UAP10.0">
<dependency id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.2.10" exclude="Build,Analyzers" />
<dependency id="Newtonsoft.Json" version="8.0.3" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>

<files>
<file src="bin\Release\*" target="lib\uap10.0"/>
<file src="bin\Release\Shared\*" target="lib\uap10.0\Shared"/>
<file src="bin\Release\Shared\Images\*" target="lib\uap10.0\Shared\Images"/>
<file src="bin\Release\Shared\Views\*" target="lib\uap10.0\Shared\Views"/>
</files>





However, in a thread answered by CoolDadTx, it is suggested as below.

In general you shouldn't be putting paths into your nuspec file as it makes it hard to build it. The correct approach is to put your nuspec file into your output folder with the correct format and then run nuget to package it. This allows you to build it in any configuration. But if you must have paths then the Release build is correct, but you can then only run it in Release builds otherwise it'll fail. Also note that you should be including the binary and PDF files as well to allow for debugging. For class libraries you should also strongly consider including the SymbolLink NuGet package in your code so that people can step into your code by pulling the source from Git/Github. But that is a nice to have.

What does it mean? Where to put my nuspec file? Do you mean bin folder? If so, it contains 6 folders (ARM, ARM64, Debug, Release, x64, x86), Is there any documentation about it?

Also, what does it mean Correct format?

Continue reading...
 
Back
Top