DOTNETCORECLI@2发布成功,但没有工件



我有一个遗留项目,想进入Azure Devops管道。我有一个构建管道设置,构建似乎成功了。我添加了一个DotnetcoreCli-Publish任务,这很成功,但运行后我从来没有任何工件可用,因此无法实现发布管道。

想知道是否有人能认出我做过的蠢事?

这些是在我的管道中定义的任务:

- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '$(solution)'
arguments: '--configuration $(buildConfiguration)'
displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/UAT'))          
inputs:
command: 'publish'
publishWebProjects: true
configuration: $(BuildConfiguration)
arguments: '--output $(Build.ArtifactStagingDirectory) --verbosity detailed'
zipAfterPublish: false # We want individual files published, not a zip

这是我的发布任务的跟踪结束:

(入口点):2021-09-09T08:57:26.4983992Z任务";消息";2021-09-09T08:57:26.4984515Z MYOrg。MyApp。UI->D: \a\1\a\Staging\MYOrg。MyApp。UI\2021-09-09T08:57:26.4985051Z
完成执行任务"消息";。2021-09-09T08:57:26.4985655Z
1>完成建筑目标";发布"在项目中";MYOrg。MyApp。UI.csproj";。2021-09-09T08:57:26.4986271Z目标&quot_InitProjectCapabilityProperties;已跳过。以前建造的成功地2021-09-09T08:57:26.4991632Z 1>目标&quot_InitPublishIntermediateOutputPath";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\DotNetCLIToolTargets\Microsoft。NET。Sdk。DotNetCLITool.targets";来自项目";D: \a\1\s\MYOrg。MyApp。UI\MY组织。MyApp。UI.csproj";(目标&quot_AspNetCoreProjectSystemPostPublish";取决于它):2021-09-09T08:57:26.4992847Z任务";ConvertToAbsolutePath";2021-09-09T08:57:26.4993300Z完成执行任务"ConvertToAbsolutePath";。2021-09-09T08:57:26.499389Z 1>完成建筑目标"_InitPublishIntermediateOutputPath";在项目中"MYOrg。MyApp。UI.csproj";。2021-09-09T08:57:26.4994986Z 1>目标&quot_TransformWebConfig";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\TransformTargets\Microsoft.NET.sdk.Publish.TransformFiles.targets"来自项目";D: \a\1\s\MYOrg。MyApp。UI\MY组织。MyApp。UI.csproj";(目标&quot_AspNetCoreProjectSystemPostPublish";取决于它):2021-09-09T08:57:26.4996207Z使用";TransformWebConfig";任务来自程序集"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0…\tools\netcoreapp1.0\Microsoft.NET.sdk.Publish.Tasks.dll"。2021-09-09T08:57:26.4997005Z任务";TransformWebConfig";2021-09-09T08:57:26.5010124Z配置以下内容用于IIS的项目:"D:\a\1\a\Station\MYOrg。MyApp。UI'2021-09-09T08:57:26.5010856Z正在更新web.config'D:\a\1\a\Staging\MYOrg。MyApp。UI\web.config'2021-09-09T08:57:26.5129541Z配置项目完成成功2021-09-09T08:57:26.5140303Z完成执行任务"TransformWebConfig";。2021-09-09T08:57:26.5143720Z 1>完成建筑目标"_TransformWebConfig";在项目中"MYOrg。MyApp。UI.csproj";。2021-09-09T08:57:26.5145086Z 1>目标&quot_TransformAppSettings";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\TransformTargets\Microsoft.NET.sdk.Publish.TransformFiles.targets"来自项目";D: \a\1\s\MYOrg。MyApp。UI\MY组织。MyApp。UI.csproj";(目标&quot_AspNetCoreProjectSystemPostPublish";取决于它):2021-09-09T08:57:26.5146333Z任务";TransformAppSettings";由于条件错误而跳过;('$(_IsAspNetCoreProject)'=='true'和'$(IsTransformAppSettingsDisabled')'!='true’并且@(DestinationConnectionStrings)!=")被评估为(true=='true'和''!='true'And!='')。2021-09-09T08:57:26.5153800Z
1>完成建筑目标"_TransformAppSettings";在项目中"MYOrg。MyApp。UI.csproj";。2021-09-09T08:57:26.5156303Z 1>目标&quot_生成EFSQL脚本";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\TransformTargets\Microsoft.NET.sdk.Publish.TransformFiles.targets"来自项目";D: \a\1\s\MYOrg。MyApp。UI\MY组织。MyApp。UI.csproj";(目标&quot_AspNetCoreProjectSystemPostPublish";取决于它):2021-09-09T08:57:26.5157868Z任务";生成EFSQL脚本";由于条件错误而跳过;('$(_IsAspNetCoreProject)'=='true'和'$(IsGenerateEFSQLScriptsDisabled)'!='true'和@(EfMigrations)!='')被评估为('true'=='true'And''!='true'And=")。2021-09-09T08:57:26.5180482Z 1>已完成构建目标&quot_生成EFSQL脚本";在项目中";MYOrg。MyApp。UI.csproj";。2021-09-09T08:57:26.5183010Z 1>目标"_生成运行命令文件";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\TransformTargets\Microsoft.NET.sdk.Publish.TransformFiles.targets"来自项目";D: \a\1\s\MYOrg.MyApp.UI\MYOrg.MiApp.UI.csproj"(目标&quot_AspNetCoreProjectSystemPostPublish";取决于它):2021-09-09T08:57:26.5185028Z任务";生成运行命令文件";由于条件错误而跳过;('$(_IsWebJobProject)'=='true'并且'$(IsGenerateRunCommandFileDisabled)'!='true")的计算结果为("==='true'和''!===true)。2021-09-09T08:57:26.5185862Z 1>完成建筑目标"_生成运行命令文件";在项目中"MYOrg.MyApp.UI.csproj";。2021-09-09T08:57:26.5186601Z目标&quot_PublishFiles"由于条件错误而跳过;('$(PublishProtocol)'!='FileSystem'和'$(PublishProtocol)'!='')评估为('FileSystem'!='FileSystem'和'FileSystem]!='')。2021-09-09T08:57:26.5187820Z 1>目标&quot_AspNetCoreProjectSystemPostPublish";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\DotNetCLIToolTargets\Microsoft.NET.sdk.DotNetCLITool.targets"来自项目";D: \a\1\s\MYOrg.MyApp.UI\MYOrg.MiApp.UI.csproj"(目标&quot_DotNetCLIPostPublish";取决于它):2021-09-09T08:57:26.5188885Z
1>完成建筑目标"_AspNetCoreProjectSystemPostPublish";在里面项目";MYOrg.MyApp.UI.csproj";。2021-09-09T08:57:26.518985Z
1>目标";AfterPublish";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\Microsoft.NET.sdk.Publish.targets"来自项目";D: \a\1\s\MYOrg.MyApp.UI\MYOrg.MiApp.UI.csproj"(目标&quot_DotNetCLIPostPublish";取决于它):2021-09-09T08:57:26.5190833Z
1>完成建筑目标";AfterPublish";在项目中"MYOrg.MyApp.UI.csproj";。2021-09-09T08:57:26.5191798Z 1>目标&quot_DotNetCLIPostPublish";在文件中"C: \hostedtoolcache\windows\dotnet\sdk\2.0.3\Sdks\Microsoft.NET.sdk.Publish\build\netstandard1.0\DotNetCLIToolTargets\Microsoft.NET.sdk.DotNetCLITool.targets"来自项目";D: \a\1\s\MYOrg.MyApp.UI\MYOrg.MiApp.UI.csproj"(条目点):2021-09-09T08:57:26.5192771Z 1>已完成构建目标&quot_DotNetCLIPostPublish";在项目中";MYOrg.MyApp.UI.csproj";。2021-09-09T08:57:26.5193415Z 1>已完成建筑项目"D: \a\1\s\MYOrg.MyApp.UI\MYOrg.MiApp.UI.csproj"(发布目标)。2021-09-09T08:57:26.5210238Z 2021-09-09CT08:57:26.5225190Z构建成功。2021-09-09T08:57:26.52600048Z 0警告2021-09-09T08:57:26.5260950Z 0错误

在执行发布命令后,您需要制作Azure Pipeline工件。

你可以这样做:

- publish: $(Build.ArtifactStagingDirectory)
artifact: WebApp

这里有关于这方面的文档。之后,您将获得一个可用于发布管道的工件。

相关内容

  • 没有找到相关文章

最新更新