asp.net-mvc - 支持:无法从 DevOps 正确部署到 IIS
问题描述
我正在尝试构建、发布和部署到 IIS。我有几个问题。主要问题是它以我不熟悉的格式部署到我的 IIS 服务器。我在下面附上了截图。
我真正想要在那个目录中的是EazeeApp.UI.zip\Content\d_C\a\1\s\Source\EazeeApp.UI\obj\Release\Package\PackageTmp
如果我将该文件复制到我的网站文件夹的根目录中,viola.
这是我的构建配置:
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
这是我的IIS Web App Deploy
设置
#Your build pipeline references an undefined variable named ‘Parameters.WebsiteName’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
steps:
- task: IISWebAppDeploymentOnMachineGroup@0
displayName: 'IIS Web App Deploy'
inputs:
WebSiteName: '$(Parameters.WebsiteName)'
Package: '_EazeeApp\drop'
XmlVariableSubstitution: True
解决方案
Package: '_EazeeApp\drop'
您当前将其指向该文件夹,但它应该指向您要部署到目标站点的 Web 发布包
Package: '_EazeeApp\drop\EazeeApp.UI.zip'
推荐阅读
- apache-spark - 禁用或强制 Spark 哈希分区
- python - GUI、无限循环进程和线程
- python - Python将列表列表转换为具有公共列和索引的数据框
- javascript - 当过滤一个
- 子弹消失。如何让他们留下来?
- python - Discord.py 加入/连接到语音通道命令不起作用。(在齿轮中)
- html - 具有固定定位的 Z 索引在 CodePen 中不起作用
- sql - Postgres 按子查询/多个子查询排序
- amazon-web-services - AWS Amplify GraphQL - 一对多连接在查询时返回空列表
- r - 更改 tibble 中变量的值
- filter - 如何将某些项目值转换为新项目值?