如何在PowerShell中运行以下命令?
C:\ Program Files\IIS\Microsoft Web Deploy\msdeploy.exe -verb:sync -source:dbfullsql ="Data Source = mysource; Integrated Security = false; User ID = sa; Pwd = sapass !; Database = mydb;" -dest:dbfullsql ="Data Source =.\ mydestsource; Integrated Security = false; User ID = sa; Pwd = sapass !; Database = mydb;",computername = 10.10.10.10,username = administrator,password = adminpass"
我在 Azure DevOps 下有一个相对简单的测试项目,我想生成代码覆盖率。
这有效...有点。我明白了:
我得到了我需要的文件(至少我认为)但是选项卡丢失了。
我有这三个步骤:
执行 .NET 测试任务 安装报告生成器 运行报告生成器以转换 (-reporttypes:HtmlInline_AzurePipelines;Cobertura") 发布结果
但选项卡没有显示?有任何想法吗?
- stage: Run_Unit_tests
jobs:
- job: 'Tests'
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
continueOnError: true
steps:
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . dotnet-reportgenerator-globaltool
displayName: Install ReportGenerator tool
- task: DotNetCoreCLI@2
displayName: Test .NET
inputs:
command: test
projects: '**/*Test/*.csproj'
arguments: '--configuration $(buildConfiguration) --logger trx --collect:"XPlat Code Coverage"'
condition: succeededOrFailed()
- task: reportgenerator@4
inputs:
reports: '$(Agent.TempDirectory)\**\coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)\coverlet\reports'
verbosity: 'Verbose'
- …Run Code Online (Sandbox Code Playgroud)