Azure 管道的 CefSharp 构建错误:无法加载文件或程序集 'CefSharp.Core.dll'

CefSharp build error with Azure pipeline :Could not load file or assembly 'CefSharp.Core.dll'

我为 windows 表格添加了 CefSharp(版本 84.4.10.0)。它在我的机器和我的虚拟机上运行没有任何问题。

正如我在 Github 上发现的那样,我已将 true 添加到我的项目并将 Prefare 32 位设置为 true。但是当我尝试使用 Azure Pipeline-s 构建它时出现错误:

##[error]SGEN(0,0): Error : Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.
##[debug]Processed: ##vso[task.logissue type=Error;sourcepath=SGEN;linenumber=0;columnnumber=0;code=;]Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.
SGEN : error : Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found. [D:\a\s\SBS_BSales.csproj]

这是我的管道 YEMEL

steps:
- task: NuGetToolInstaller@1
  displayName: 'Use NuGet 5.4.0'
  inputs:
    versionSpec: 5.4.0
steps:
- task: NuGetCommand@2
  displayName: 'NuGet restore'
  inputs:
    restoreSolution: '$(Parameters.solution)'
steps:
- task: VSBuild@1
  displayName: 'Build solution **\*.sln'
  inputs:
    solution: '$(Parameters.solution)'
    platform: '$(BuildPlatform)'
    configuration: '$(BuildConfiguration)'
    createLogFile: true

Iv 禁用 SGEN XML 从 project proports -> Selected Configuration Release -> Build-> Output-> Generate serialization assembly = 否

问题已解决:)