DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Deploying a Simple Golang Web App on Heroku
  • Mulesoft Cloudhub Deployment using Azure DevOps
  • Tutorial: Build a Serverless API Back-end for Slack
  • Azure DevOps and Pipeline as Code Using YAML

Trending

  • A Modern Stack for Building Scalable Systems
  • Performance Optimization Techniques for Snowflake on AWS
  • Kubeflow: Driving Scalable and Intelligent Machine Learning Systems
  • Contextual AI Integration for Agile Product Teams
  1. DZone
  2. Coding
  3. Languages
  4. Error Publishing .NET Core App in Azure DevOps YAML Build

Error Publishing .NET Core App in Azure DevOps YAML Build

A dev quickly walks us through an error he received when working in .NET Core and how he fixed it with a little YAML.

By 
Ricci Gian Maria user avatar
Ricci Gian Maria
·
May. 06, 19 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
6.0K Views

Join the DZone community and get the full member experience.

Join For Free

short story, i've created a simple yaml build for a .net core project where one of the tasks publishes a simple .net core console application. after running the build i got a strange error in the output:

no web project was found in the repository. web projects are identified by presence of either a web.config file or wwwroot folder in the directory.

this is extremely strange, because the project is not a web project, it is a standard console application written for .net core 2.2, so i do not understand why it is searching a web.config file.

then i decided to create a standard non-yaml build, and when i dropped the task on the build i immediately understood the problem . this happens because .net core task with the publish command is assuming, by default, that a web application is going to be published.

default value for the dotnet publish command figure 1: default value for the dotnet publish command is to publish a web project.

since i hae no web project to publish i immediately changed  my yaml definition to explicitly set the publishwebprojects property to false.

 - task: dotnetcorecli@2
    displayname: .net core publish
    inputs:
      command: publish
      projects: '$(serviceproject)'
      arguments: '--output $(build.artifactstagingdirectory)'
      configuration: $(buildconfiguration)
      workingdirectory: $(serviceprojectdir)
      publishwebprojects: false
      zipafterpublish: true

and the build was fixed.

Build (game engine) YAML .NET Web application app DevOps azure

Published at DZone with permission of Ricci Gian Maria, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Deploying a Simple Golang Web App on Heroku
  • Mulesoft Cloudhub Deployment using Azure DevOps
  • Tutorial: Build a Serverless API Back-end for Slack
  • Azure DevOps and Pipeline as Code Using YAML

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: