With all dependencies added to the package.
I've tried multiple ways but it looks like I might have to get messy to do it, adding a nuspec file on its own is not sufficient because of the way in which dependencies are resolved.
To put this into perspective If I a package a .net framework project with a nuspec file and in the file point at the relevant output folder (for example bin\release) of a build I get everything I need.
My use case is to run some acceptance tests (out of process) in a CI pipeline. At this point I don't want to be accessing source control.
Net Framework will not be part of the . Net Standard, particularly once you get into those areas that have been most heavily refactored by . Net Core (e.g. ASP.Net). You can use this extension for visual studio to check the compatibility.
Take a look at NuGet.Build.Tasks.Pack
You can use a .nuspec file to pack your project if you reference at NuGet.Build.Tasks.Pack
. I've done this to roll up multiple projects in my solution into one nuget package.
You can pack with dotnet.exe
:
dotnet pack <path to .csproj file> /p:NuspecFile=<path to nuspec file> /p:NuspecProperties=<> /p:NuspecBasePath=<Base path>
Or MSBuild:
msbuild /t:pack <path to .csproj file> /p:NuspecFile=<path to nuspec file> /p:NuspecProperties=<> /p:NuspecBasePath=<Base path>
More details can be found here: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets#packing-using-a-nuspec
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With