appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 64 forks source link

"No artifacts found matching path" error for Asp.Net Core MVC Deployment to Azure App Service Linux #3852

Closed sahgilbert closed 1 year ago

sahgilbert commented 1 year ago

Here is my folder path:

Screenshot 2022-11-08 at 12 21 40

Here is the error in AppVeyor:

Screenshot 2022-11-08 at 12 23 28

Here is my appveyor.yml file:

#---------------------------------#
#      general configuration      #
#---------------------------------#

version: 1.0.{build}-{branch}

branches:
  only:
   - master

#---------------------------------#
#    environment configuration    #
#---------------------------------#

clone_depth: 1

image: Visual Studio 2022

cache:
  - '%LocalAppData%\NuGet\Cache'    # NuGet < v3
  - '%LocalAppData%\NuGet\v3-cache' # NuGet v3

init:
  - cmd: git config --global core.autocrlf true

#---------------------------------#
#       build configuration       #
#---------------------------------#

platform: Any CPU

configuration: Release

before_build:
  - cmd: dotnet --version
  - cmd: dotnet restore ./HousePlatform/HousePlatform.csproj --verbosity m
build_script:
  - cmd: dotnet publish ./HousePlatform/HousePlatform.csproj

#---------------------------------#
#       test configuration       #
#---------------------------------#
test_script:
  - cmd: dotnet build ./UnitTests/UnitTests.csproj --verbosity m
  - cmd: dotnet test

#---------------------------------#
#      artifacts configuration    #
#---------------------------------#

artifacts:
 - path: '.HousePlatform/HousePlatform/bin/Release/net6.0/publish'
   name: WebsiteSourceCode
   type: WebDeployPackage

#---------------------------------#
#     deployment configuration    #
#---------------------------------#

deploy:
- provider: WebDeploy
  server:  [REDACTED_FOR_SECURITY]
  website:  [REDACTED_FOR_SECURITY]
  username:  [REDACTED_FOR_SECURITY]
  password:
    secure: [REDACTED_FOR_SECURITY]
  artifact: WebsiteSourceCode
  aspnet_core: true
  app_offline: true
  do_not_use_checksum: true
  aspnet_core_force_restart: true

Many thanks

sahgilbert commented 1 year ago

I've fixed the artifact path by changing the value to the following: