我在 Azure DevOps 中有一个持续构建任务,只要代码被推送到存储库,它就会构建解决方案。所以我的代码在我的本地机器上构建和运行良好,但是当它尝试在 devOps 中构建时,会出现这个错误,“ Process 'msbuild.exe' exited with code '1'
”。并且构建失败。
注意:我也在使用 MS Access 数据库并使用它的 dll 作为参考。
以下是构建日志
##[section]Starting: VSBuild
==============================================================================
Task : Visual Studio build
Description : Build with MSBuild and set the Visual Studio version property
Version : 1.151.2
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
==============================================================================
##[command]"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\vswhere.exe" -version [16.0,17.0) -latest -format json
##[command]"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" "d:\a\1\s\EDS.Attach.sln" /nologo /nr:false /dl:CentralLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=1437a450-5179-47db-98bd-fe8e0723e344|SolutionDir=d:\a\1\s"*ForwardingLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.151.2\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:platform="Any CPU" /p:configuration="Release" /p:VisualStudioVersion="16.0" /p:_MSDeployUserAgent="VSTS_03117f94-5776-4b48-ae99-669bb78290be_build_3_0"
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 8/23/2019 1:40:52 PM.
Project "d:\a\1\s\EDS.Attach.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
ValidateProjects:
The project "EDS.Attach.Installer" is not selected for building in solution configuration "Release|Any CPU".
Project "d:\a\1\s\EDS.Attach.sln" (1) is building "d:\a\1\s\EDS.Attach.WinApp\EDS.Attach.WinApp.csproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
Project "d:\a\1\s\EDS.Attach.WinApp\EDS.Attach.WinApp.csproj" (2) is building "d:\a\1\s\EDS.Attach.Business\EDS.Attach.Business.csproj" (3:2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
Project "d:\a\1\s\EDS.Attach.Business\EDS.Attach.Business.csproj" (3:2) is building "d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj" (4:3) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
Project "d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj" (4:3) is building "d:\a\1\s\EDS.Attach.Models\EDS.Attach.Models.csproj" (7:4) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
CoreCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE /highentropyva+ /reference:d:\a\1\s\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll /reference:d:\a\1\s\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\mscorlib.dll" /reference:d:\a\1\s\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.ComponentModel.DataAnnotations.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Drawing.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Net.Http.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Runtime.Serialization.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Security.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Xml.Linq.dll" /debug:pdbonly /filealign:512 /optimize+ /out:obj\Release\EDS.Attach.Models.dll /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Static Analysis Tools\\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /target:library /utf8output Claim\AttachmentIdReceivedEventArgs.cs Claim\ClaimStatusChangedEventArgs.cs Claim\DeleteRequirementResponseModel.cs Claim\DeleteRequirementsDataModel.cs Claim\EvaluateClaimAttachmentRulesModel.cs Claim\GetAttachmentIdDataModel.cs EDSAnnotations\IntMaxLengthAttribute.cs EDSAnnotations\NonZeroAttribute.cs Payer\ADACodeModel.cs Common\APIResponseBaseModel.cs Claim\AttachmentDetailModel.cs Claim\CaptureAttachmentModel.cs Claim\ClaimAttachmentModel.cs Claim\ClaimsInProcessModel.cs Common\MethodCallBaseModel.cs Claim\GetClaimsDataModel.cs Payer\GetPayerRulesDataModel.cs Payer\PayerAttachementRulesModel.cs Payer\Payer.cs Payer\PayerAttachmentRule.cs Payer\PayerAttachmentRuleDescriptionModel.cs Settings\Practice.cs Properties\AssemblyInfo.cs Claim\SaveAttachmentResponseModel.cs Claim\SaveAttachmentDataModel.cs Settings\UserModel.cs "C:\Users\VssAdministrator\AppData\Local\Temp\.NETFramework,Version=v4.5.2.AssemblyAttributes.cs"
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn
_CopyFilesMarkedCopyLocal:
Copying file from "d:\a\1\s\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EntityFramework.dll".
Copying file from "d:\a\1\s\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.xml" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EntityFramework.xml".
Copying file from "d:\a\1\s\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll" to "d:\a\1\s\EDS.Attach.Models\bin\Release\Newtonsoft.Json.dll".
Copying file from "d:\a\1\s\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EntityFramework.SqlServer.dll".
Copying file from "d:\a\1\s\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.xml" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EntityFramework.SqlServer.xml".
Copying file from "d:\a\1\s\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.pdb" to "d:\a\1\s\EDS.Attach.Models\bin\Release\Newtonsoft.Json.pdb".
Copying file from "d:\a\1\s\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.xml" to "d:\a\1\s\EDS.Attach.Models\bin\Release\Newtonsoft.Json.xml".
Creating "d:\a\1\s\EDS.Attach.Models\obj\Release\EDS.Attach.Models.csproj.CopyComplete" because "AlwaysCreate" was specified.
_CopyAppConfigFile:
Copying file from "d:\a\1\s\EDS.Attach.Models\App.Config" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EDS.Attach.Models.dll.config".
CopyFilesToOutputDirectory:
Copying file from "d:\a\1\s\EDS.Attach.Models\obj\Release\EDS.Attach.Models.dll" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EDS.Attach.Models.dll".
EDS.Attach.Models -> d:\a\1\s\EDS.Attach.Models\bin\Release\EDS.Attach.Models.dll
Copying file from "d:\a\1\s\EDS.Attach.Models\obj\Release\EDS.Attach.Models.pdb" to "d:\a\1\s\EDS.Attach.Models\bin\Release\EDS.Attach.Models.pdb".
Done Building Project "d:\a\1\s\EDS.Attach.Models\EDS.Attach.Models.csproj" (default targets).
##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): Warning MSB3284: Cannot get the file path for type library "4ac9e1da-5bad-4ac7-86e3-24f4cdceca28" version 12.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): warning MSB3284: Cannot get the file path for type library "4ac9e1da-5bad-4ac7-86e3-24f4cdceca28" version 12.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj]
##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): Warning MSB3283: Cannot find wrapper assembly for type library "ADODB". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): warning MSB3283: Cannot find wrapper assembly for type library "ADODB". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit. [d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj]
##[warning]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): Warning MSB3293: Could not resolve dependent COM reference "2a75196c-d9eb-4129-b803-931327f72d5c" version 2.8.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): warning MSB3293: Could not resolve dependent COM reference "2a75196c-d9eb-4129-b803-931327f72d5c" version 2.8. [d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj]
Done Building Project "d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj" (default targets) -- FAILED.
Project "d:\a\1\s\EDS.Attach.Business\EDS.Attach.Business.csproj" (3:2) is building "d:\a\1\s\EDS.Attach.Data\EDS.Attach.Data.csproj" (5:3) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
Done Building Project "d:\a\1\s\EDS.Attach.Data\EDS.Attach.Data.csproj" (default targets) -- FAILED.
Done Building Project "d:\a\1\s\EDS.Attach.Business\EDS.Attach.Business.csproj" (default targets) -- FAILED.
Project "d:\a\1\s\EDS.Attach.WinApp\EDS.Attach.WinApp.csproj" (2) is building "d:\a\1\s\EDS.Attach.DependencyInjection\EDS.Attach.DependencyInjection.csproj" (6:2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
Done Building Project "d:\a\1\s\EDS.Attach.DependencyInjection\EDS.Attach.DependencyInjection.csproj" (default targets) -- FAILED.
Project "d:\a\1\s\EDS.Attach.WinApp\EDS.Attach.WinApp.csproj" (2) is building "d:\a\1\s\EDS.Attach.UI\EDS.Attach.UI.csproj" (8:2) on node 1 (default targets).
PrepareForBuild:
Creating directory "bin\Release\".
Creating directory "obj\Release\".
Done Building Project "d:\a\1\s\EDS.Attach.UI\EDS.Attach.UI.csproj" (default targets) -- FAILED.
Done Building Project "d:\a\1\s\EDS.Attach.WinApp\EDS.Attach.WinApp.csproj" (default targets) -- FAILED.
Done Building Project "d:\a\1\s\EDS.Attach.sln" (default targets) -- FAILED.
Build FAILED.
"d:\a\1\s\EDS.Attach.sln" (default target) (1) ->
"d:\a\1\s\EDS.Attach.WinApp\EDS.Attach.WinApp.csproj" (default target) (2) ->
"d:\a\1\s\EDS.Attach.Business\EDS.Attach.Business.csproj" (default target) (3:2) ->
"d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj" (default target) (4:3) ->
(ResolveComReferences target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): warning MSB3284: Cannot get the file path for type library "4ac9e1da-5bad-4ac7-86e3-24f4cdceca28" version 12.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) [d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): warning MSB3283: Cannot find wrapper assembly for type library "ADODB". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component. For example, if the COM component is 32-bit, your target platform must not be 64-bit. [d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2726,5): warning MSB3293: Could not resolve dependent COM reference "2a75196c-d9eb-4129-b803-931327f72d5c" version 2.8. [d:\a\1\s\EDS.Attach.Common\EDS.Attach.Common.csproj]
3 Warning(s)
0 Error(s)
Time Elapsed 00:00:13.90
##[error]Process 'msbuild.exe' exited with code '1'.
##[section]Finishing: VSBuild
任何人都可以帮忙吗?
DevOps - 进程“msbuild.exe”在持续集成构建中以代码“1”退出
您似乎正在使用 COM 库,该库在您管道运行的代理上不存在。
这个 COM 库应该在你本地 Windows 的注册中注册,而不是在构建服务器上,你可以检查你的 COM 库是否在 Windows 的注册中注册:
%windir%\system32\regsvr32 YourComLibrary.dll
或者您可以在您的本地机器上托管的私人代理上执行您的管道。
如果您想将它与托管代理一起使用,您可以尝试将 dll 包含在**\bin\
文件夹中并修改构建过程添加程序集。
检查类似问题以获取更多详细信息。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句