Using "Package Web Applications for Octopus deployment" with .NET Core applications

Bjarte Djuvik Næss's Avatar

Bjarte Djuvik Næss

08 Aug, 2018 12:12 PM

I have selected the "Package Web Applications for Octopus deployment" for my .NET Core application, but no NuGet package is being created.

This works nicely for regular .NET 4.6.1 Web Api application without doing any additional configuration, but not for .NET Core.

Is this supposed to work, or do I need some extra steps?

Here is my yaml:

version: 1.0.{build}
image: Visual Studio 2017
before_build:
- ps: nuget restore ./MySolution.sln
build:
  publish_wap_octopus: true
  verbosity: minimal
deploy:
- provider: Octopus
  push_packages: true
  server: https://***********.octopus.app
  api_key:
    secure: ************************************
after_deploy:
- ps: ''

  1. Support Staff 1 Posted by Owen McDonnell on 08 Aug, 2018 10:12 PM

    Owen McDonnell's Avatar

    According to this apparently not, but should be fairly easy to get working. You just need to run a dotnet publish command on your project and then run the octo.exe pack command on the output.
    Described here.

    You'll probably need to switch to custom packaging in the appveyor.yml.

  2. 2 Posted by Bjarte Djuvik N... on 09 Aug, 2018 05:41 AM

    Bjarte Djuvik Næss's Avatar

    Thanks! This seems to do the trick

    version: 1.0.{build}
    image: Visual Studio 2017
    before_build:
    - ps: nuget restore ./MySolution.sln
    build:
      publish_wap_octopus: true
      verbosity: minimal
    after_build:
    - ps: >-
        dotnet publish ./MySolution.sln --output published-app --configuration Release

        octo pack -id MySolution --version 1.0.0 --basePath .\MyProject\published-app\
    artifacts:
    - path: ./MySolution.1.0.0.nupkg
      name: MySolution
      type: OctopusPackage
    deploy:
    - provider: Octopus
      push_packages: true
      server: https://********.octopus.app
      api_key:
        secure: **************************
    after_deploy:
    - ps: ''

  3. Support Staff 3 Posted by Owen McDonnell on 11 Aug, 2018 04:55 AM

    Owen McDonnell's Avatar

    Cool, thanks for sharing!

  4. Owen McDonnell closed this discussion on 11 Aug, 2018 04:55 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac