我正在使用Genexus KB 18 Upgrade5,为. NET生成。它是一个小KB(少于1000个对象),并且它使用GAM。
当我间歇性地但非常频繁地执行“build all”时,我遇到以下错误:
Success: Default (.NET) Generation
Compressing static files...Success
========== DeveloperMenu Compilation for Default (.NET) started ==========
dotnet build -nologo -c Debug /v:q /m /p:Configuration=Debug /p:GxExternalReference=GeneXus.Security.API.Common.dll "D:\KBs\GX18\MT18_v6\Pro\build\LastBuild.sln"
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: The "ResolveAssemblyReference" task failed unexpectedly. [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: System.IO.IOException: The process cannot access the file 'D:\KBs\GX18\MT18_v6\Pro\web\bin\Microsoft.Identity.Client.dll' because it is being used by another process. [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at System.IO.File.OpenRead(String path) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Shared.AssemblyNameExtension.GetAssemblyNameEx(String path) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.<>c.<Execute>b__255_3(String p) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.SystemState.GetAssemblyName(String path) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.Resolver.FileMatchesAssemblyName(AssemblyNameExtension assemblyName, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, Boolean allowMismatchBetweenFusionNameAndFileName, String pathToCandidateAssembly, ResolutionSearchLocation searchLocation) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.Resolver.ResolveAsFile(String fullPath, AssemblyNameExtension assemblyName, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, Boolean allowMismatchBetweenFusionNameAndFileName, List`1 assembliesConsideredAndRejected) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.Resolver.ResolveFromDirectory(AssemblyNameExtension assemblyName, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String directory, List`1 assembliesConsideredAndRejected) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.DirectoryResolver.Resolve(AssemblyNameExtension assemblyName, String sdkName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, List`1 assembliesConsideredAndRejected, String& foundPath, Boolean& userRequestedSpecificFile) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.AssemblyResolution.ResolveReference(IEnumerable`1 jaggedResolvers, AssemblyNameExtension assemblyName, String sdkName, String rawFileNameCandidate, Boolean isPrimaryProjectReference, Boolean wantSpecificVersion, String[] executableExtensions, String hintPath, String assemblyFolderKey, List`1 assembliesConsideredAndRejected, String& resolvedSearchPath, Boolean& userRequestedSpecificFile) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ResolveReference(AssemblyNameExtension assemblyName, String rawFileNameCandidate, Reference reference) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ResolveAssemblyFilenames() [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure() [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ReferenceTable.ComputeClosure(IEnumerable`1 remappedAssembliesValue, ITaskItem[] referenceAssemblyFiles, ITaskItem[] referenceAssemblyNames, List`1 exceptions) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetLastWriteTime getLastWriteTime, GetAssemblyRuntimeVersion getRuntimeVersion, GetAssemblyPathInGac getAssemblyPathInGac, IsWinMDFile isWinMDFile, ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute() [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
C:\Program Files\dotnet\sdk\6.0.308\Microsoft.Common.CurrentVersion.targets(2302,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [D:\KBs\GX18\MT18_v6\Pro\build\global.usuario.aexportreportwwusuario\global.usuario.aexportreportwwusuario.csproj]
Build FAILED.
问题似乎出现在Microsoft.Identity.Client.dll和BouncyCastle.Crypto.dll中。
重复“生成全部”操作有时会暂时解决错误。
Genexus运行的多个dotnet任务似乎存在一些并发问题。我正在努力寻找一种没有这些干扰的有效工作方法。有没有人对如何解决这个问题有深刻的见解?
1条答案
按热度按时间pkwftd7m1#
您可以尝试使用参数/m:1将并行编译更改为串行编译更多信息:使用GeneXus 18 Upgrade 5在KB中构建.NET期间的并发访问问题