Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

How can I wrap C# DLLs into a NuGet package on Ubuntu?

$
0
0

On Ubuntu I'd like to wrap a few C# DLL files into a NuGet package. On Windows one would use the NuGet package explorer or nuget.exe+ manually edited *.csproj.nuspec. In summary when manually editing the *.nuspec file one may add DLLs via the <files> section:

<files><file src="some\Path\YourDll.dll" target="lib"></file></files>

On Ubuntu I'd like to use dotnet pack instead. However it seems like it's not able to operate on a *.csproj.nuspec file:

Usage: dotnet pack [options] <PROJECT | SOLUTION>Arguments:<PROJECT | SOLUTION>   The project or solution file to operate on. If a file is not specified, the command will search the current directory for one.Options:  -h, --help                            Show command line help.  -o, --output <OUTPUT_DIR>             The output directory to place built packages in.  --no-build                            Do not build the project before packing. Implies --no-restore.  --include-symbols                     Include packages with symbols in addition to regular packages in output directory.  --include-source                      Include PDBs and source files. Source files go into the 'src' folder in the resulting nuget package.  -c, --configuration <CONFIGURATION>   The configuration to use for building the package. The default for most projects is 'Debug'.  --version-suffix <VERSION_SUFFIX>     Set the value of the $(VersionSuffix) property to use when building the project.  -s, --serviceable                     Set the serviceable flag in the package. See https://aka.ms/nupkgservicing for more information.  --nologo                              Do not display the startup banner or the copyright message.  --interactive                         Allows the command to stop and wait for user input or action (for example to complete authentication).  --no-restore                          Do not restore the project before building.  -v, --verbosity <LEVEL>               Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].  --runtime <RUNTIME_IDENTIFIER>        The target runtime to restore packages for.  --no-dependencies                     Do not restore project-to-project references and only restore the specified project.  --force                               Force all dependencies to be resolved even if the last restore was successful.                                        This is equivalent to deleting project.assets.json.

Can I wrap C# DLLs into a NuGet package on Ubuntu using the dotnet CLI? Or do I have to use the nuget CLI (apt-get install nuget) instead with the approach like on Windows?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>