Publish your app via the command line

Keyboard Shortcuts

The dotnet command-line tool makes it easy to deploy your application from the command line. It's also possible to publish from a build script or another automated tool. This video helps you understand the syntax of the dotnet publish command, and how to use it to publish your application to IIS without the IDE.

- [Instructor] Deploying to IIS via the command line…is a useful alternative to using visual studio,…especially if you want to script…or automate the deployment process.…The dotnet published rule makes it easy to deploy…an application using the command line or a script.…I'll demonstrate how to use this tool…from PowerShell to publish the application to IIS.…I've navigated to the project directory in PowerShell.…First I need to run dotnet restore…to restore any NuGet packages for the project.…And then dotnet build,…just to make sure that it'll build correctly.…

Now, I'll run dotnet publish,…and then with the -C Release parameter,…which will tell the application to build…and publish in release mode.…When the process is complete,…the binaries will be placed in the bin directory.…I can open up an explorer window to see where those landed.…If I open up bin,…Release,…netcoreapp 1.1,…which is the framework we're building on top of,…and then, the publish directory.…All of the files and libraries needed to run the application…

Resume Transcript Auto-Scroll

Author

Updated

6/12/2017

Released

11/10/2016

Learn how to deploy your cross-platform ASP.NET Core applications. With the changes to ASP.NET Core that allow apps to run across Mac, Windows, and Linux platforms, developers need to learn how to choose between their many options to deploy successfully. This course will help you deploy cross-platform apps to IIS and cloud services like Azure, as well as to Linux servers. Follow along with Nate Barbettini as he sets up a simple project and works through these different deployment scenarios. Get practical tips and insights into the pros and cons of each option and find out how Docker containers can help you streamline your ASP.NET Core deployment process.