How to do it...

  1. Open up Command Prompt by running it as administrator. In Command Prompt, go to the src\AspNetCore directory of your project. Ensure that you have a folder called publish in your temp folder on the C:\ drive of your computer, then type in the following command, and press Enter. This will build and publish your project:
        dotnet publish --output "c:temppublish" --configuration release
Depending on what you called your ASP.NET Core application, the folder name under your src folder will be different to what mine is.
  1. After the app has been published you will see the published files along with all their dependencies in the output ...

Get C# 7 and .NET Core Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.