I am coming from the Java world into the C# world so I'm sorry if this question doesn't make sense. But, overall, what I'm trying to do is figure out how the C# world handles packaging and publishing C# applications. Not a library DLL, but an application, which is basically what's ends up in the bin/Release directory.
I need this to run CI build environment. I've found a lot of references to clicking in Visual Studio to do this, but, that doesn't work in a CI build environment.
I need to "build", which is basically generate the contents of the bin/Release directory
Next I need to "package", which is basically zip up the bin/Release directory
Finally I need to "publish", which is take that zip file and put it somewhere which I can retrieve it by name and version.
"build" is easy. I think I have that figured out. I thought a Nuget would be used to package and publish the application similar to how Maven works for Java. But it doesn't look like Nuget is used for applications, only libraires? If that's the case, then where can I put application versions?
CodePudding user response:
You can check Microsoft's documentation on how to deploy your apps.
Publish a .NET console application using Visual Studio
I also suggest taking a look into the dotnet CLI documentation. It will help you setup your pipelines accordingly.
In my case, as I use Azure pipelines, I just need to publish like this
dotnet publish --configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)
CodePudding user response:
Just make use of Advanced Installer to avoid any error in packing your package. It's an easy way and faster way