Let's imagine you've already created an Orchard Core app and now it's time to show it to the world. How do you publish it, or rather, how do you create its publish package?
When publishing an Orchard Core, or any .NET Core app (be it a desktop app for release or deploying a web app) you need to use the
dotnet publish command (see its docs). For web apps running on Azure App Service our usual practice is to do a self-contained deployment, see the .NET Core publishing guidelines. A standard publish command for a 32b Windows App service is as following:
dotnet publish SolutionName.sln --configuration Release --runtime win10-x86 --output C:\path-to-package-folder --self-contained true
For a 64b App Service the runtime would be
If you just want to do a quick debug publish then running
dotnet publish in the folder of an Orchard-based web app’s solution without any parameters will create a published app in the YourWebApp\bin\Debug\netcoreapp3.1\publish folder.
For a PowerShell script that does a publish and then zips up the package see this script in our HipChat to Microsoft Teams Migration Utility.
Did you like this post? It's part of our Orchard Core Nuggets series where we answer common Orchard questions, be it about user-facing features or developer-level issues. Check out the other posts for more such bite-sized Orchard Core tips and let us know if you have another question!