Azure App Service Deploy 版本 4 - *.deploy.cmd 未找到

Version 4 of Azure App Service Deploy - *.deploy.cmd not found

我正在尝试使用 Azure App Service Deploy 版本 4 并使用发布配置文件进行连接,将我的应用程序发布到 Azure。不幸的是,发布总是在部署阶段停止,并显示以下日志:

2018-06-05T13:46:47.1570167Z ##[section]Starting: Deploy to Azure

2018-06-05T13:46:47.1577464Z Task : Azure App Service Deploy

2018-06-05T13:46:47.1577875Z Description : Update Azure WebApp Services On Windows, Web App On Linux with built-in images or docker containers, ASP.NET, .NET Core, PHP, Python or Node based Web applications, Function Apps, Mobile Apps, Api applications, Web Jobs using Web Deploy / Kudu REST APIs

2018-06-05T13:46:47.1578288Z Version : 4.1.7

2018-06-05T13:46:47.1578503Z Author : Microsoft Corporation

2018-06-05T13:46:47.1578765Z Help : More Information

2018-06-05T13:46:48.5822489Z ##[error]Error: No package found with specified pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-05T13:46:48.5857098Z ##[section]Finishing: Deploy to Azure

我不知道该怎么办,因为我在 Azure 部署文档中找不到任何关于 deploy.cmd 文件的信息。我必须使用当前处于预览模式的版本 4,因为通过发布配置文件进行部署是我唯一的选择。


更多信息:

我在我的发布配置文件中使用 MSDeploy 作为网络发布方法。

这是调试日志(我用 xyz 替换了一些名称,但我认为这些信息与此处无关):

2018-06-06T09:08:35.0003493Z ##[debug]agent.workFolder=D:\a

2018-06-06T09:08:35.0033559Z ##[debug]loading inputs and endpoints

2018-06-06T09:08:35.0038896Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN

2018-06-06T09:08:35.0049663Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION

2018-06-06T09:08:35.0052788Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION

2018-06-06T09:08:35.0056543Z ##[debug]loading INPUT_CONNECTIONTYPE

2018-06-06T09:08:35.0058753Z ##[debug]loading INPUT_DEPLOYTOSLOTORASEFLAG

2018-06-06T09:08:35.0060382Z ##[debug]loading INPUT_EXCLUDEFILESFROMAPPDATAFLAG

2018-06-06T09:08:35.0061865Z ##[debug]loading INPUT_INLINESCRIPT

2018-06-06T09:08:35.0063426Z ##[debug]loading INPUT_PACKAGE

2018-06-06T09:08:35.0066224Z ##[debug]loading INPUT_PUBLISHPROFILEPASSWORD

2018-06-06T09:08:35.0067906Z ##[debug]loading INPUT_PUBLISHPROFILEPATH

2018-06-06T09:08:35.0069224Z ##[debug]loading INPUT_REMOVEADDITIONALFILESFLAG

2018-06-06T09:08:35.0070734Z ##[debug]loading INPUT_RENAMEFILESFLAG

2018-06-06T09:08:35.0072348Z ##[debug]loading INPUT_SCRIPTPATH

2018-06-06T09:08:35.0075673Z ##[debug]loading INPUT_SETPARAMETERSFILE

2018-06-06T09:08:35.0077762Z ##[debug]loading INPUT_TAKEAPPOFFLINEFLAG

2018-06-06T09:08:35.0079810Z ##[debug]loading INPUT_USEWEBDEPLOY

2018-06-06T09:08:35.0081592Z ##[debug]loading INPUT_WEBAPPKIND

2018-06-06T09:08:35.0082955Z ##[debug]loading INPUT_XMLTRANSFORMATION

2018-06-06T09:08:35.0084823Z ##[debug]loading INPUT_XMLVARIABLESUBSTITUTION

2018-06-06T09:08:35.0093697Z ##[debug]loading SECRET_PUBLISHPROFILEPASSWORD

2018-06-06T09:08:35.0098888Z ##[debug]loaded 20

2018-06-06T09:08:35.2771292Z ##[debug]agent.proxyurl=undefined

2018-06-06T09:08:35.2771976Z ## [debug]VSTS_ARM_REST_IGNORE_SSL_ERRORS=undefined

2018-06-06T09:08:35.2772456Z ##[debug]AZURE_HTTP_USER_AGENT=VSTS_b3b41228- 42cb-4f40-92e9-62eb4918f3a4_release_1_23_23_1

2018-06-06T09:08:35.3083885Z ##[debug]check path : D:\a_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94- 48d9c1acdcb1.1.7\task.json

2018-06-06T09:08:35.3085278Z ##[debug]set resource file to: D:\a_tasks\AzureRmWebAppDeployment_497d490f-eea7-4f2b-ab94-48d9c1acdcb1.1.7\task.json

2018-06-06T09:08:35.3086246Z ##[debug]system.culture=en-US

2018-06-06T09:08:35.3221858Z ##[debug]ConnectionType=PublishProfile

2018-06-06T09:08:35.3224073Z ##[debug]WebAppKind=app

2018-06-06T09:08:35.3226659Z ##[debug]DeployToSlotOrASEFlag=false

2018-06-06T09:08:35.3227033Z ##[debug]VirtualApplication=null

2018-06-06T09:08:35.3229440Z ##[debug]Package=D:\a\r1\a_CI .NET Core\drop\xyz.zip

2018-06-06T09:08:35.3229978Z ##[debug]GenerateWebConfig=null

2018-06-06T09:08:35.3230385Z ##[debug]WebConfigParameters=null

2018-06-06T09:08:35.3231041Z ##[debug]XmlTransformation=false

2018-06-06T09:08:35.3232525Z ##[debug]JSONFiles=null

2018-06-06T09:08:35.3234042Z ##[debug]XmlVariableSubstitution=false

2018-06-06T09:08:35.3236701Z ##[debug]UseWebDeploy=false

2018-06-06T09:08:35.3237236Z ##[debug]TakeAppOfflineFlag=false

2018-06-06T09:08:35.3238059Z ##[debug]RenameFilesFlag=false

2018-06-06T09:08:35.3238698Z ##[debug]AdditionalArguments=null

2018-06-06T09:08:35.3241554Z ##[debug]ScriptType=null

2018-06-06T09:08:35.3242705Z ##[debug]InlineScript=:: You can provide your deployment commands here. One command per line.

2018-06-06T09:08:35.3243214Z ##[debug]ScriptPath=D:\a\r1\a

2018-06-06T09:08:35.3243711Z ##[debug]DockerNamespace=null

2018-06-06T09:08:35.3244088Z ##[debug]AppSettings=null

2018-06-06T09:08:35.3245290Z ##[debug]StartupCommand=null

2018-06-06T09:08:35.3245776Z ##[debug]ConfigurationSettings=null

2018-06-06T09:08:35.3246285Z ##[debug]PublishProfilePath=D:\a\r1\a***.pubxml

2018-06-06T09:08:35.3246989Z ##[debug]PublishProfilePassword=***

2018-06-06T09:08:35.3248921Z ##[debug]Predeployment Step Started

2018-06-06T09:08:35.3261147Z ##[debug]Finding files matching input: D:\a\r1\a***.pubxml

2018-06-06T09:08:35.3261800Z ##[debug]Matching glob pattern: D:\a\r1\a***.pubxml

2018-06-06T09:08:35.3262255Z ##[debug]Index of first wildcard: 10

2018-06-06T09:08:35.3262895Z ##[debug]find root dir: D:\a\r1\a\

2018-06-06T09:08:35.3267015Z ##[debug]findPath: 'D:\a\r1\a\'

2018-06-06T09:08:35.3267947Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'

2018-06-06T09:08:35.3269147Z ##[debug]findOptions.followSymbolicLinks: 'true'

2018-06-06T09:08:35.3274196Z ##[debug] D:\a\r1\a\ (directory)

2018-06-06T09:08:35.3281597Z ##[debug] D:\a\r1\a_CI .NET Core (directory)

2018-06-06T09:08:35.3286601Z ##[debug] D:\a\r1\a_CI .NET Core\drop (directory)

2018-06-06T09:08:35.3290769Z ##[debug] D:\a\r1\a_CI .NET Core\drop\xyz.zip (file)

2018-06-06T09:08:35.3293516Z ##[debug] D:\a\r1\a_CI .NET Core\drop\xyz - Web Deploy.pubxml (file)

2018-06-06T09:08:35.3293935Z ##[debug]5 results

2018-06-06T09:08:35.3298091Z ##[debug]patternRoot: ''

2018-06-06T09:08:35.3298639Z ##[debug]matchOptions.debug: 'undefined'

2018-06-06T09:08:35.3299997Z ##[debug]matchOptions.nobrace: 'undefined'

2018-06-06T09:08:35.3300471Z ##[debug]matchOptions.noglobstar: 'undefined'

2018-06-06T09:08:35.3301015Z ##[debug]matchOptions.dot: 'undefined'

2018-06-06T09:08:35.3301435Z ##[debug]matchOptions.noext: 'undefined'

2018-06-06T09:08:35.3302184Z ##[debug]matchOptions.nocase: 'true'

2018-06-06T09:08:35.3302692Z ##[debug]matchOptions.nonull: 'undefined'

2018-06-06T09:08:35.3303074Z ##[debug]matchOptions.matchBase: 'true'

2018-06-06T09:08:35.3303700Z ##[debug]matchOptions.nocomment: 'undefined'

2018-06-06T09:08:35.3304333Z ##[debug]matchOptions.nonegate: 'undefined'

2018-06-06T09:08:35.3305141Z ##[debug]matchOptions.flipNegate: 'undefined'

2018-06-06T09:08:35.3305619Z ##[debug]pattern: 'D:\a\r1\a***.pubxml'

2018-06-06T09:08:35.3306098Z ##[debug]expanding braces

2018-06-06T09:08:35.3306668Z ##[debug]pattern: 'D:/a/r1/a/**/*.pubxml'

2018-06-06T09:08:35.3307199Z ##[debug]applying include pattern against original list

2018-06-06T09:08:35.3338789Z ##[debug]1 matches

2018-06-06T09:08:35.3339828Z ##[debug]1 final results

2018-06-06T09:08:35.3446116Z ##[debug]Publish Profile: {"WebPublishMethod":["MSDeploy"],"ResourceId":["xyz"],"ResourceGroup":["xyz"],"PublishProvider":["AzureWebSite"],"LastUsedBuildConfiguration":["Release"],"LastUsedPlatform":["Any CPU"],"SiteUrlToLaunchAfterPublish":["xyz"],"LaunchSiteAfterPublish":["True"],"ExcludeApp_Data":["False"],"ProjectGuid":["0069d61c-2633-4e96-b9d4-c321827ff547"],"MSDeployServiceURL":["xyz"],"DeployIisAppPath":["xyz"],"RemoteSitePhysicalPath":[""],"SkipExtraFilesOnServer":["True"],"MSDeployPublishMethod":["WMSVC"],"EnableMSDeployBackup":["True"],"UserName":["xyz"],"_SavePWD":["True"],"_DestinationType":["AzureWebSite"],"TargetFramework":["netcoreapp2.0"],"SelfContained":["false"],"_IsPortable":["true"]}

2018-06-06T09:08:35.3533911Z ##[debug][GET]http://xyz

2018-06-06T09:08:36.5376747Z ##[debug]App Service status Code: '200'. Status Message: 'OK'

2018-06-06T09:08:36.5378242Z ##[debug]set AppServiceApplicationUrl=xyz

2018-06-06T09:08:36.5427498Z ##[debug]Processed: ##vso[task.setvariable variable=AppServiceApplicationUrl;issecret=false;]xyz

2018-06-06T09:08:36.5428263Z ##[debug]Deployment Step Started

2018-06-06T09:08:36.5429986Z ##[debug]Performing the deployment of webapp using publish profile.

2018-06-06T09:08:36.5430570Z ##[debug]Finding files matching input: D:\a\r1\a_CI .NET Core\drop\xyz.zip

2018-06-06T09:08:36.5431099Z ##[debug]Finding files matching input: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-06T09:08:36.5431796Z ##[debug]Matching glob pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-06T09:08:36.5432803Z ##[debug]Index of first wildcard: 29

2018-06-06T09:08:36.5433444Z ##[debug]find root dir: D:\a\r1\a_CI .NET Core\drop\

2018-06-06T09:08:36.5433875Z ##[debug]findPath: 'D:\a\r1\a_CI .NET Core\drop\'

2018-06-06T09:08:36.5434698Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'

2018-06-06T09:08:36.5435250Z ##[debug]findOptions.followSymbolicLinks: 'true'

2018-06-06T09:08:36.5435763Z ##[debug] D:\a\r1\a_CI .NET Core\drop\ (directory)

2018-06-06T09:08:36.5436284Z ##[debug] D:\a\r1\a_CI .NET Core\drop\xyz.zip (file)

2018-06-06T09:08:36.5436867Z ##[debug] D:\a\r1\a_CI .NET Core\drop\xyz - Web Deploy.pubxml (file)

2018-06-06T09:08:36.5437380Z ##[debug]3 results

2018-06-06T09:08:36.5437837Z ##[debug]patternRoot: ''

2018-06-06T09:08:36.5438564Z ##[debug]matchOptions.debug: 'undefined'

2018-06-06T09:08:36.5439030Z ##[debug]matchOptions.nobrace: 'undefined'

2018-06-06T09:08:36.5439519Z ##[debug]matchOptions.noglobstar: 'undefined'

2018-06-06T09:08:36.5439989Z ##[debug]matchOptions.dot: 'undefined'

2018-06-06T09:08:36.5440436Z ##[debug]matchOptions.noext: 'undefined'

2018-06-06T09:08:36.5440865Z ##[debug]matchOptions.nocase: 'true'

2018-06-06T09:08:36.5441291Z ##[debug]matchOptions.nonull: 'undefined'

2018-06-06T09:08:36.5463216Z ##[debug]matchOptions.matchBase: 'true'

2018-06-06T09:08:36.5464910Z ##[debug]matchOptions.nocomment: 'undefined'

2018-06-06T09:08:36.5465466Z ##[debug]matchOptions.nonegate: 'undefined'

2018-06-06T09:08:36.5465958Z ##[debug]matchOptions.flipNegate: 'undefined'

2018-06-06T09:08:36.5466462Z ##[debug]pattern: 'D:\a\r1\a_CI .NET Core\drop*.deploy.cmd'

2018-06-06T09:08:36.5466937Z ##[debug]expanding braces

2018-06-06T09:08:36.5467383Z ##[debug]pattern: 'D:/a/r1/a/_CI .NET Core/drop/*.deploy.cmd'

2018-06-06T09:08:36.5467846Z ##[debug]applying include pattern against original list

2018-06-06T09:08:36.5468475Z ##[debug]0 matches

2018-06-06T09:08:36.5468869Z ##[debug]0 final results

2018-06-06T09:08:36.5469314Z ##[debug]No matching files were found with search pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-06T09:08:36.5469846Z ##[debug]Deployment Failed with Error: Error: No package found with specified pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-06T09:08:36.5470406Z ##[debug]task result: Failed

2018-06-06T09:08:36.5536667Z ##[error]Error: No package found with specified pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-06T09:08:36.5553501Z ##[debug]Processed: ##vso[task.issue type=error;]Error: No package found with specified pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd

2018-06-06T09:08:36.5555471Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: No package found with specified pattern: D:\a\r1\a_CI .NET Core\drop*.deploy.cmd 2018-06-06T09:08:36.5555917Z ##[debug]

您需要通过 Web 部署包发布方法发布 Web 应用程序以生成必要的文件(例如 deploy.cmd):

  1. 删除 .NET Core 构建和发布任务
  2. 添加Visual Studio构建任务(/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)")