很抱歉,如果这是一个愚蠢的问题,但是我已经为这个问题苦苦挣扎了好几个星期了,没有取得任何进展。我在Azure Devops中为.Net项目建立了一个具有以下参数的步骤:
/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"
尽管它表示打包为单个文件。我在放置文件夹中得到以下内容:
Orchard.Autoroute.deploy-readme.txt
Orchard.Autoroute.deploy.cmd
Orchard.Autoroute.SetParameters.xml
Orchard.Autoroute.SourceManifest.xml
Orchard.Autoroute.zip
Orchard.Azure.deploy-readme.txt
Orchard.Azure.deploy.cmd
Orchard.Azure.MediaServices.deploy-readme.txt
Orchard.Azure.MediaServices.deploy.cmd
Orchard.Azure.MediaServices.SetParameters.xml
Orchard.Azure.MediaServices.SourceManifest.xml
Orchard.Azure.MediaServices.zip
Orchard.Azure.SetParameters.xml
Orchard.Azure.SourceManifest.xml
Orchard.Azure.zip
Orchard.Blogs.deploy-readme.txt
Orchard.Blogs.deploy.cmd
Orchard.Blogs.SetParameters.xml
Orchard.Blogs.SourceManifest.xml
Orchard.Blogs.zip
Orchard.Caching.deploy-readme.txt
Orchard.Caching.deploy.cmd
Orchard.Caching.SetParameters.xml
Orchard.Caching.SourceManifest.xml
Orchard.Caching.zip
Orchard.CodeGeneration.deploy-readme.txt
Orchard.CodeGeneration.deploy.cmd
Orchard.CodeGeneration.SetParameters.xml
Orchard.CodeGeneration.SourceManifest.xml
Orchard.CodeGeneration.zip
Orchard.Comments.deploy-readme.txt
Orchard.Comments.deploy.cmd
Orchard.Comments.SetParameters.xml
Orchard.Comments.SourceManifest.xml
Orchard.Comments.zip
Orchard.Conditions.deploy-readme.txt
Orchard.Conditions.deploy.cmd
Orchard.Conditions.SetParameters.xml
Orchard.Conditions.SourceManifest.xml
Orchard.Conditions.zip
Orchard.ContentPermissions.deploy-readme.txt
Orchard.ContentPermissions.deploy.cmd
Orchard.ContentPermissions.SetParameters.xml
Orchard.ContentPermissions.SourceManifest.xml
Orchard.ContentPermissions.zip
Orchard.ContentPicker.deploy-readme.txt
Orchard.ContentPicker.deploy.cmd
Orchard.ContentPicker.SetParameters.xml
Orchard.ContentPicker.SourceManifest.xml
Orchard.ContentPicker.zip
Orchard.ContentTypes.deploy-readme.txt
Orchard.ContentTypes.deploy.cmd
Orchard.ContentTypes.SetParameters.xml
Orchard.ContentTypes.SourceManifest.xml
Orchard.ContentTypes.zip
Orchard.Core.deploy-readme.txt
Orchard.Core.deploy.cmd
Orchard.Core.SetParameters.xml
Orchard.Core.SourceManifest.xml
Orchard.Core.zip
Orchard.CustomForms.deploy-readme.txt
Orchard.CustomForms.deploy.cmd
Orchard.CustomForms.SetParameters.xml
Orchard.CustomForms.SourceManifest.xml
Orchard.CustomForms.zip
Orchard.Dashboards.deploy-readme.txt
Orchard.Dashboards.deploy.cmd
Orchard.Dashboards.SetParameters.xml
Orchard.Dashboards.SourceManifest.xml
Orchard.Dashboards.zip
Orchard.DesignerTools.deploy-readme.txt
Orchard.DesignerTools.deploy.cmd
Orchard.DesignerTools.SetParameters.xml
Orchard.DesignerTools.SourceManifest.xml
Orchard.DesignerTools.zip
Orchard.DynamicForms.deploy-readme.txt
Orchard.DynamicForms.deploy.cmd
Orchard.DynamicForms.SetParameters.xml
Orchard.DynamicForms.SourceManifest.xml
Orchard.DynamicForms.zip
Orchard.Email.deploy-readme.txt
Orchard.Email.deploy.cmd
Orchard.Email.SetParameters.xml
Orchard.Email.SourceManifest.xml
Orchard.Email.zip
Orchard.Fields.deploy-readme.txt
Orchard.Fields.deploy.cmd
Orchard.Fields.SetParameters.xml
Orchard.Fields.SourceManifest.xml
Orchard.Fields.zip
Orchard.Forms.deploy-readme.txt
Orchard.Forms.deploy.cmd
Orchard.Forms.SetParameters.xml
Orchard.Forms.SourceManifest.xml
Orchard.Forms.zip
Orchard.ImageEditor.deploy-readme.txt
Orchard.ImageEditor.deploy.cmd
Orchard.ImageEditor.SetParameters.xml
Orchard.ImageEditor.SourceManifest.xml
Orchard.ImageEditor.zip
Orchard.ImportExport.deploy-readme.txt
Orchard.ImportExport.deploy.cmd
Orchard.ImportExport.SetParameters.xml
Orchard.ImportExport.SourceManifest.xml
Orchard.ImportExport.zip
Orchard.Indexing.deploy-readme.txt
Orchard.Indexing.deploy.cmd
Orchard.Indexing.SetParameters.xml
Orchard.Indexing.SourceManifest.xml
Orchard.Indexing.zip
Orchard.JobsQueue.deploy-readme.txt
Orchard.JobsQueue.deploy.cmd
Orchard.JobsQueue.SetParameters.xml
Orchard.JobsQueue.SourceManifest.xml
Orchard.JobsQueue.zip
Orchard.jQuery.deploy-readme.txt
Orchard.jQuery.deploy.cmd
Orchard.jQuery.SetParameters.xml
Orchard.jQuery.SourceManifest.xml
Orchard.jQuery.zip
Orchard.Layouts.deploy-readme.txt
Orchard.Layouts.deploy.cmd
Orchard.Layouts.SetParameters.xml
Orchard.Layouts.SourceManifest.xml
Orchard.Layouts.zip
Orchard.Lists.deploy-readme.txt
Orchard.Lists.deploy.cmd
Orchard.Lists.SetParameters.xml
Orchard.Lists.SourceManifest.xml
Orchard.Lists.zip
Orchard.Localization.deploy-readme.txt
Orchard.Localization.deploy.cmd
Orchard.Localization.SetParameters.xml
Orchard.Localization.SourceManifest.xml
Orchard.Localization.zip
Orchard.Media.deploy-readme.txt
Orchard.Media.deploy.cmd
Orchard.Media.SetParameters.xml
Orchard.Media.SourceManifest.xml
Orchard.Media.zip
Orchard.MediaLibrary.deploy-readme.txt
Orchard.MediaLibrary.deploy.cmd
Orchard.MediaLibrary.SetParameters.xml
Orchard.MediaLibrary.SourceManifest.xml
Orchard.MediaLibrary.zip
Orchard.MediaPicker.deploy-readme.txt
Orchard.MediaPicker.deploy.cmd
Orchard.MediaPicker.SetParameters.xml
Orchard.MediaPicker.SourceManifest.xml
Orchard.MediaPicker.zip
Orchard.MediaProcessing.deploy-readme.txt
Orchard.MediaProcessing.deploy.cmd
Orchard.MediaProcessing.SetParameters.xml
Orchard.MediaProcessing.SourceManifest.xml
Orchard.MediaProcessing.zip
Orchard.MessageBus.deploy-readme.txt
Orchard.MessageBus.deploy.cmd
Orchard.MessageBus.SetParameters.xml
Orchard.MessageBus.SourceManifest.xml
Orchard.MessageBus.zip
Orchard.Migrations.deploy-readme.txt
Orchard.Migrations.deploy.cmd
Orchard.Migrations.SetParameters.xml
Orchard.Migrations.SourceManifest.xml
Orchard.Migrations.zip
Orchard.Modules.deploy-readme.txt
Orchard.Modules.deploy.cmd
Orchard.Modules.SetParameters.xml
Orchard.Modules.SourceManifest.xml
Orchard.Modules.zip
Orchard.MultiTenancy.deploy-readme.txt
Orchard.MultiTenancy.deploy.cmd
Orchard.MultiTenancy.SetParameters.xml
Orchard.MultiTenancy.SourceManifest.xml
Orchard.MultiTenancy.zip
Orchard.OutputCache.deploy-readme.txt
Orchard.OutputCache.deploy.cmd
Orchard.OutputCache.SetParameters.xml
Orchard.OutputCache.SourceManifest.xml
Orchard.OutputCache.zip
Orchard.Packaging.deploy-readme.txt
Orchard.Packaging.deploy.cmd
Orchard.Packaging.SetParameters.xml
Orchard.Packaging.SourceManifest.xml
Orchard.Packaging.zip
Orchard.Pages.deploy-readme.txt
Orchard.Pages.deploy.cmd
Orchard.Pages.SetParameters.xml
Orchard.Pages.SourceManifest.xml
Orchard.Pages.zip
Orchard.Projections.deploy-readme.txt
Orchard.Projections.deploy.cmd
Orchard.Projections.SetParameters.xml
Orchard.Projections.SourceManifest.xml
Orchard.Projections.zip
Orchard.PublishLater.deploy-readme.txt
Orchard.PublishLater.deploy.cmd
Orchard.PublishLater.SetParameters.xml
Orchard.PublishLater.SourceManifest.xml
Orchard.PublishLater.zip
Orchard.Recipes.deploy-readme.txt
Orchard.Recipes.deploy.cmd
Orchard.Recipes.SetParameters.xml
Orchard.Recipes.SourceManifest.xml
Orchard.Recipes.zip
Orchard.Redis.deploy-readme.txt
Orchard.Redis.deploy.cmd
Orchard.Redis.SetParameters.xml
Orchard.Redis.SourceManifest.xml
Orchard.Redis.zip
Orchard.Resources.deploy-readme.txt
Orchard.Resources.deploy.cmd
Orchard.Resources.SetParameters.xml
Orchard.Resources.SourceManifest.xml
Orchard.Resources.zip
Orchard.Roles.deploy-readme.txt
Orchard.Roles.deploy.cmd
Orchard.Roles.SetParameters.xml
Orchard.Roles.SourceManifest.xml
Orchard.Roles.zip
Orchard.Rules.deploy-readme.txt
Orchard.Rules.deploy.cmd
Orchard.Rules.SetParameters.xml
Orchard.Rules.SourceManifest.xml
Orchard.Rules.zip
Orchard.Scripting.CSharp.deploy-readme.txt
Orchard.Scripting.CSharp.deploy.cmd
Orchard.Scripting.CSharp.SetParameters.xml
Orchard.Scripting.CSharp.SourceManifest.xml
Orchard.Scripting.CSharp.zip
Orchard.Scripting.deploy-readme.txt
Orchard.Scripting.deploy.cmd
Orchard.Scripting.Dlr.deploy-readme.txt
Orchard.Scripting.Dlr.deploy.cmd
Orchard.Scripting.Dlr.SetParameters.xml
Orchard.Scripting.Dlr.SourceManifest.xml
Orchard.Scripting.Dlr.zip
Orchard.Scripting.SetParameters.xml
Orchard.Scripting.SourceManifest.xml
Orchard.Scripting.zip
Orchard.Search.deploy-readme.txt
Orchard.Search.deploy.cmd
Orchard.Search.SetParameters.xml
Orchard.Search.SourceManifest.xml
Orchard.Search.zip
Orchard.SecureSocketsLayer.deploy-readme.txt
Orchard.SecureSocketsLayer.deploy.cmd
Orchard.SecureSocketsLayer.SetParameters.xml
Orchard.SecureSocketsLayer.SourceManifest.xml
Orchard.SecureSocketsLayer.zip
Orchard.Setup.deploy-readme.txt
Orchard.Setup.deploy.cmd
Orchard.Setup.SetParameters.xml
Orchard.Setup.SourceManifest.xml
Orchard.Setup.zip
Orchard.Tags.deploy-readme.txt
Orchard.Tags.deploy.cmd
Orchard.Tags.SetParameters.xml
Orchard.Tags.SourceManifest.xml
Orchard.Tags.zip
Orchard.TaskLease.deploy-readme.txt
Orchard.TaskLease.deploy.cmd
Orchard.TaskLease.SetParameters.xml
Orchard.TaskLease.SourceManifest.xml
Orchard.TaskLease.zip
Orchard.Taxonomies.deploy-readme.txt
Orchard.Taxonomies.deploy.cmd
Orchard.Taxonomies.SetParameters.xml
Orchard.Taxonomies.SourceManifest.xml
Orchard.Taxonomies.zip
Orchard.Templates.deploy-readme.txt
Orchard.Templates.deploy.cmd
Orchard.Templates.SetParameters.xml
Orchard.Templates.SourceManifest.xml
Orchard.Templates.zip
Orchard.Themes.deploy-readme.txt
Orchard.Themes.deploy.cmd
Orchard.Themes.SetParameters.xml
Orchard.Themes.SourceManifest.xml
Orchard.Themes.zip
Orchard.Tokens.deploy-readme.txt
Orchard.Tokens.deploy.cmd
Orchard.Tokens.SetParameters.xml
Orchard.Tokens.SourceManifest.xml
Orchard.Tokens.zip
Orchard.Users.deploy-readme.txt
Orchard.Users.deploy.cmd
Orchard.Users.SetParameters.xml
Orchard.Users.SourceManifest.xml
Orchard.Users.zip
Orchard.Warmup.deploy-readme.txt
Orchard.Warmup.deploy.cmd
Orchard.Warmup.SetParameters.xml
Orchard.Warmup.SourceManifest.xml
Orchard.Warmup.zip
Orchard.Web.deploy-readme.txt
Orchard.Web.deploy.cmd
Orchard.Web.SetParameters.xml
Orchard.Web.SourceManifest.xml
Orchard.Web.zip
等等等等
在发布步骤中,我具有一个带有以下参数的Azure App Service部署步骤:
$(System.DefaultWorkingDirectory)/**/Orchard.Web.zip
但是它只为网站部署代码,而不是Orchard的模块,因此该网站无法正常工作。我无法指定:
$(System.DefaultWorkingDirectory)/**/*.zip
否则,我会收到此错误: 错误:多个软件包与指定的模式匹配:D:\ a \ r1 \ a ***。zip。请限制搜索模式。
如果我从Visual Studio发布,但不是通过AzureDevops发布,则当前网站可以正确发布。
每个模块都需要一个部署步骤吗? 为什么我不能像在VS中那样通过AzureDevops进行部署步骤? 我需要进行构建和发布步骤的什么组合才能进行WebDeploy,以部署所有代码? 教程很理想。
编辑:
我也在这里提出了这个问题: https://developercommunity.visualstudio.com/content/problem/408833/azuredevops-publish-publishes-too-many-zip-files.html