You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to experiment with the idea of packaging our deployable modules from a monorepo as .nupkg files and then use that as the mechanism for installing our projects into various VMs later. This would be somewhat similar to what Octopus Deploy does (or did? not sure if they still use NuGet for that purpose, but that's beside the point): using NuGet packages as the medium for transporting and installing runnable projects, APIs and services.
My question then is: can I customize my projects in a way that when running dotnet pack on them, what is output is a .nupkg file where its contents are the same contents that are usually produced when executing dotnet publish?
I know I could manually produce a .nuspec file and then manually generate NuGet packages from the outputs of dotnet publish for each folder, but this would make our deployment procedure significantly more convoluted. Instead, I wanted to be able to call dotnet pack against the entire solution, and have it produce the packages for the projects that I customized (I'd annotated all irrelevant ones with IsPackable=false), so that I can then just push those packages to one of our internal nuget feeds.
What would the best approach be to achieve this?
From what I've read thus far, this post appears to be the closest thing to what I want to achieve:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to experiment with the idea of packaging our deployable modules from a monorepo as
.nupkgfiles and then use that as the mechanism for installing our projects into various VMs later. This would be somewhat similar to what Octopus Deploy does (or did? not sure if they still use NuGet for that purpose, but that's beside the point): using NuGet packages as the medium for transporting and installing runnable projects, APIs and services.My question then is: can I customize my projects in a way that when running
dotnet packon them, what is output is a.nupkgfile where its contents are the same contents that are usually produced when executingdotnet publish?I know I could manually produce a
.nuspecfile and then manually generate NuGet packages from the outputs ofdotnet publishfor each folder, but this would make our deployment procedure significantly more convoluted. Instead, I wanted to be able to calldotnet packagainst the entire solution, and have it produce the packages for the projects that I customized (I'd annotated all irrelevant ones withIsPackable=false), so that I can then just push those packages to one of our internal nuget feeds.What would the best approach be to achieve this?
From what I've read thus far, this post appears to be the closest thing to what I want to achieve:
Do you think that would be a good idea for my use case, or should I explore some other alternative here?
Somewhat related:
Originally posted here:
Beta Was this translation helpful? Give feedback.
All reactions