Create and push an ASP.NET Core project

The sample project for this guide is the Angular project template with ASP.NET Core application. The template consists of an ASP.NET Core project to act as an API backend and an Angular CLI project to act as a UI. The base project has been modified slightly to host the Angular CLI project outside of the ASP.NET Core project to enable us to configure NGINX both as a reverse proxy to the ASP.NET Core project while also serving the Angular CLI project as static content from the file system.

Upload the package to the built-in repository

Firstly we need to make the package available for Octopus to deploy.

We’ve crafted and packaged v1.0.0 of this sample application for you to try out (see the link below). Alternatively you can create your own application and package the application yourself to try it out. Click here for steps to publish and package the ASP.NET Core project.

  1. Download NginxSampleWebApp.1.0.0.zip.
  2. Upload it to the Octopus Built-In repository (you can do this by going to Library ➜ Packages and clicking the Upload package button).

Publishing and packing the website

# Publish the application to a folder
dotnet publish source/NginxSampleWebApp --output published-app --configuration Release

# Package the folder into a ZIP
octo pack --id NginxSampleWebApp --version 1.0.0 --basePath published-app

If you are using the built-in repository, you can create a zip file instead. The generated nupkg or zip file should then be then be pushed to a repository.

Learn more

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Sunday, January 1, 2023