1

it is a webform solution created by vs2008 ,it has no ".csproj" file ,the .cs code is in "App_Code" folder。 Azure devops build the solution success ,but deploy fail, the deploy result error is "Error: No package found with specified pattern.
Check if the package mentioned in the task is published as an artifact in the build or a previous stage and downloaded in the current job.";

here is the build log:

D:\a\1\s\DataManagerWeb\App_Code\Repository\BaseRepository.cs(11): warning CS0169: The field 'BaseRepository.connStr' is never used [D:\a\1\s\DataManagerWeb.metaproj]
##[warning]DataManagerWeb\ajax\accountAction.aspx.cs(187,0): Warning CS0162: Unreachable code detected
D:\a\1\s\DataManagerWeb\ajax\accountAction.aspx.cs(187): warning CS0162: Unreachable code detected [D:\a\1\s\DataManagerWeb.metaproj]
Done Building Project "D:\a\1\s\DataManagerWeb.metaproj" (default targets).
Done Building Project "D:\a\1\s\DataManagerWeb.sln" (default targets).

Build succeeded.

"D:\a\1\s\DataManagerWeb.sln" (default target) (1) ->
(ValidateProjects target) -> 
  D:\a\1\s\DataManagerWeb.sln.metaproj : warning MSB4121: The project configuration for project "DataManagerWeb" was not specified in the solution file for the solution configuration "Release|Any CPU". [D:\a\1\s\DataManagerWeb.sln]


"D:\a\1\s\DataManagerWeb.sln" (default target) (1) ->
"D:\a\1\s\DataManagerWeb.metaproj" (default target) (2) ->
(Build target) -> 
  D:\a\1\s\DataManagerWeb.metaproj : warning MSB3030: Could not copy the file "D:\a\Dapper.dll" because it was not found.
  D:\a\1\s\DataManagerWeb.metaproj : warning MSB4181: The "Copy" task returned false but did not log an error.


"D:\a\1\s\DataManagerWeb.sln" (default target) (1) ->
"D:\a\1\s\DataManagerWeb.metaproj" (default target) (2) ->
  D:\a\1\s\DataManagerWeb.metaproj : warning MSB3030: Could not copy the file "D:\a\1\s\Newtonsoft.Json.dll" because it was not found.
  D:\a\1\s\DataManagerWeb.metaproj : warning MSB4181: The "Copy" task returned false but did not log an error.


"D:\a\1\s\DataManagerWeb.sln" (default target) (1) ->
"D:\a\1\s\DataManagerWeb.metaproj" (default target) (2) ->
  D:\a\1\s\DataManagerWeb\App_Code\BLL\Sessions.cs(27): warning CS0168: The variable 'ex' is declared but never used [D:\a\1\s\DataManagerWeb.metaproj]
  D:\a\1\s\DataManagerWeb\App_Code\Repository\BaseRepository.cs(11): warning CS0169: The field 'BaseRepository.connStr' is never used [D:\a\1\s\DataManagerWeb.metaproj]
  D:\a\1\s\DataManagerWeb\ajax\accountAction.aspx.cs(187): warning CS0162: Unreachable code detected [D:\a\1\s\DataManagerWeb.metaproj]

    8 Warning(s)
    0 Error(s)

Time Elapsed 00:00:38.44
Finishing: Build solution

here is the Publish Artifact log:

Starting: Publish Artifact
==============================================================================
Task         : Publish build artifacts
Description  : Publish build artifacts to Azure Pipelines or a Windows file share
Version      : 1.198.0
Author       : Microsoft Corporation
Help         : https://learn.microsoft.com/azure/devops/pipelines/tasks/utility/publish-build-artifacts
==============================================================================
##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.
Finishing: Publish Artifact
jersey
  • 21
  • 3

1 Answers1

0

The root cause of this

##[warning]Directory 'D:\a\1\a' is empty. Nothing will be added to build artifact 'drop'.

Warning is that you are missing multiple dll files.

1. Go to Tools -> Library Package Manager -> Package Manager Console
Install Dapper.dll and Newtonsoft.Json.dll

2. Make sure you don't copy anything to $(build.artifactstagingdirectory) in your definition. Don’t miss 'Copy Files'-Task before the 'publish artifact'

References: 'Newtonsoft' could not be found , https://github.com/microsoft/azure-pipelines-tasks/issues/7247 and VSTS: Directory 'd:\a\1\a' is empty. Nothing will be added to build artifact 'drop'

Madhuraj Vadde
  • 1,099
  • 1
  • 5
  • 13