Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to configure azure-pipeline.yml for asp.net core 2.2 ?

How to configure azure-pipeline.yml for asp.net core 2.2 ?

Scheduled Pinned Locked Moved C#
tutorialannouncementcsharpasp-netquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Bastien Vandamme
    wrote on last edited by
    #1

    Hello, I have the feeling this question can become a discussions because there is a lot of parameters that can be change and I don't know what to do. I'm trying to setup a azure pipeline. I already did this in the past but with template and not for a .NET Core web application. It was easy because I could use a template. For some reason, here, I could not chose any template. The Azure Pipeline tool directly ask me to edit a yml file. Maybe because my repository is a local DevOps repository? I have no idea. I followed this tutorial: https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops and created this yml file: ``` # ASP.NET Core # Build and test ASP.NET Core projects targeting .NET Core. # Add steps that run tests, create a NuGet package, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: - master pool: vmImage: 'Ubuntu-16.04' variables: buildConfiguration: 'Release' steps: # - script: dotnet build --configuration $(buildConfiguration) # displayName: 'dotnet build $(buildConfiguration)' \- task: DotNetCoreInstaller@0 inputs: version: '2.2.202' # replace this value with the version that you need for your project \- script: dotnet restore \- task: DotNetCoreCLI@2 displayName: Build inputs: command: build projects: '**/*.csproj' arguments: '--configuration Release' # Update this to match your need # do this after you've built your app, near the end of your pipeline in most cases # for example, you do this before you deploy to an Azure web app on Windows \- task: DotNetCoreCLI@2 inputs: command: publish publishWebProjects: True arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: True # - task: PublishBuildArtifacts@1 # inputs: # ArtifactName: 'drop' ``` Here is my result: All is success except ``` ##[section]Starting: DotNetCoreCLI ============================================================================== Task : .NET Core Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet. Version : 2.150.1 Author : Microsoft Corporation Help : [More Information](https://go.microsoft.com/fwlink/?linkid=832194) =========================================

    L 1 Reply Last reply
    0
    • B Bastien Vandamme

      Hello, I have the feeling this question can become a discussions because there is a lot of parameters that can be change and I don't know what to do. I'm trying to setup a azure pipeline. I already did this in the past but with template and not for a .NET Core web application. It was easy because I could use a template. For some reason, here, I could not chose any template. The Azure Pipeline tool directly ask me to edit a yml file. Maybe because my repository is a local DevOps repository? I have no idea. I followed this tutorial: https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops and created this yml file: ``` # ASP.NET Core # Build and test ASP.NET Core projects targeting .NET Core. # Add steps that run tests, create a NuGet package, deploy, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: - master pool: vmImage: 'Ubuntu-16.04' variables: buildConfiguration: 'Release' steps: # - script: dotnet build --configuration $(buildConfiguration) # displayName: 'dotnet build $(buildConfiguration)' \- task: DotNetCoreInstaller@0 inputs: version: '2.2.202' # replace this value with the version that you need for your project \- script: dotnet restore \- task: DotNetCoreCLI@2 displayName: Build inputs: command: build projects: '**/*.csproj' arguments: '--configuration Release' # Update this to match your need # do this after you've built your app, near the end of your pipeline in most cases # for example, you do this before you deploy to an Azure web app on Windows \- task: DotNetCoreCLI@2 inputs: command: publish publishWebProjects: True arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)' zipAfterPublish: True # - task: PublishBuildArtifacts@1 # inputs: # ArtifactName: 'drop' ``` Here is my result: All is success except ``` ##[section]Starting: DotNetCoreCLI ============================================================================== Task : .NET Core Description : Build, test, package, or publish a dotnet application, or run a custom dotnet command. For package commands, supports NuGet.org and authenticated feeds like Package Management and MyGet. Version : 2.150.1 Author : Microsoft Corporation Help : [More Information](https://go.microsoft.com/fwlink/?linkid=832194) =========================================

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Never met an asp.net project that didn't have a web.config file ... somewhere.

      Quote:

      The web.config file configures the ASP.NET Core Module.

      [Host ASP.NET Core on Windows with IIS | Microsoft Docs](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2)

      "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

      B 1 Reply Last reply
      0
      • L Lost User

        Never met an asp.net project that didn't have a web.config file ... somewhere.

        Quote:

        The web.config file configures the ASP.NET Core Module.

        [Host ASP.NET Core on Windows with IIS | Microsoft Docs](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2)

        "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

        B Offline
        B Offline
        Bastien Vandamme
        wrote on last edited by
        #3

        So why the publish tell me the config file is missing when I want to publish on my azure web app? Publish I can do manually with no error. Arrrgggg Microsoft please help. You example are wrong.

        L 1 Reply Last reply
        0
        • B Bastien Vandamme

          So why the publish tell me the config file is missing when I want to publish on my azure web app? Publish I can do manually with no error. Arrrgggg Microsoft please help. You example are wrong.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Bastien Vandamme wrote:

          Microsoft please help. You example are wrong

          Have you told them?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups