Skip to content

Sometimes build and sometimes error #39753

Closed as not planned
Closed as not planned
@vncoelho

Description

@vncoelho

Describe the bug

Sometimes the compiler publishes and sometimes not, presenting the following error:

#41 2.832   Determining projects to restore...
#41 3.652   Restored /opt/neo-modules/neo/src/Neo.VM/Neo.VM.csproj (in 71 ms).
#41 3.738   Restored /opt/neo-modules/neo/src/Neo.Cryptography.BLS12_381/Neo.Cryptography.BLS12_381.csproj (in 149 ms).
#41 3.738   Restored /opt/neo-modules/neo/src/Neo.Json/Neo.Json.csproj (in 169 ms).
#41 3.740   Restored /opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj (in 171 ms).
#41 3.740   Restored /opt/neo-modules/neo/src/Neo.IO/Neo.IO.csproj (in 171 ms).
#41 3.741   Restored /opt/neo-modules/neo/src/Neo.ConsoleService/Neo.ConsoleService.csproj (in 172 ms).
#41 3.741   Restored /opt/neo-modules/neo/src/Neo/Neo.csproj (in 172 ms).
#41 3.743   Restored /opt/neo-modules/src/RpcServer/RpcServer.csproj (in 172 ms).
#41 3.746   Restored /opt/neo-modules/src/ApplicationLogs/ApplicationLogs.csproj (in 173 ms).
#41 3.776 
#41 3.776 GOING TO PUBLISH ApplicationLogs...
#41 3.876 MSBuild version 17.9.6+a4ecab324 for .NET
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly. [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018: System.IO.IOException: The process cannot access the file '/opt/neo-modules/neo/src/Neo.Extensions/bin/Release/net8.0/Neo.Extensions.deps.json' because it is being used by another process. [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Init(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Int64& fileLength, UnixFileMode& filePermissions) [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException) [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at System.IO.File.Create(String path) [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateDepsFile.WriteDepsFile(String depsFilePath) [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160 /usr/share/dotnet/sdk/8.0.202/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(284,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/opt/neo-modules/neo/src/Neo.Extensions/Neo.Extensions.csproj::TargetFramework=net8.0]
#41 7.160   Neo.Extensions -> /opt/neo-modules/neo/src/Neo.Extensions/bin/Release/net8.0/Neo.Extensions.dll
#41 7.169   Neo.Json -> /opt/neo-modules/neo/src/Neo.Json/bin/Release/net8.0/Neo.Json.dll
#41 7.205   Neo.Json -> /opt/neo-modules/neo/src/Neo.Json/bin/Release/net8.0/Neo.Json.dll
#41 7.224   Neo.Cryptography.BLS12_381 -> /opt/neo-modules/neo/src/Neo.Cryptography.BLS12_381/bin/Release/net8.0/Neo.Cryptography.BLS12_381.dll
#41 7.244   Neo.Cryptography.BLS12_381 -> /opt/neo-modules/neo/src/Neo.Cryptography.BLS12_381/bin/Release/net8.0/Neo.Cryptography.BLS12_381.dll
#41 7.388   Neo.VM -> /opt/neo-modules/neo/src/Neo.VM/bin/Release/net8.0/Neo.VM.dll
#41 7.390   Neo.ConsoleService -> /opt/neo-modules/neo/src/Neo.ConsoleService/bin/Release/net8.0/Neo.ConsoleService.dll
#41 7.570   Neo.IO -> /opt/neo-modules/neo/src/Neo.IO/bin/Release/net8.0/Neo.IO.dll
#41 7.835   Neo.VM -> /opt/neo-modules/neo/src/Neo.VM/bin/Release/net8.0/Neo.VM.dll
#41 8.929 /opt/neo-modules/neo/src/Neo/NeoSystem.cs(119,59): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/NeoSystem.cs(119,91): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/NeoSystem.cs(131,91): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/ProtocolSettings.cs(123,39): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/Persistence/StoreFactory.cs(39,33): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/Cryptography/Helper.cs(163,36): warning SYSLIB0053: 'AesGcm.AesGcm(byte[])' is obsolete: 'AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.' (https://aka.ms/dotnet-warnings/SYSLIB0053) [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/Cryptography/Helper.cs(191,36): warning SYSLIB0053: 'AesGcm.AesGcm(byte[])' is obsolete: 'AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.' (https://aka.ms/dotnet-warnings/SYSLIB0053) [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 8.929 /opt/neo-modules/neo/src/Neo/SmartContract/IInteroperable.cs(38,53): warning SYSLIB0050: 'FormatterServices' is obsolete: 'Formatter-based serialization is obsolete and should not be used.' (https://aka.ms/dotnet-warnings/SYSLIB0050) [/opt/neo-modules/neo/src/Neo/Neo.csproj::TargetFramework=net8.0]
#41 9.001   Neo -> /opt/neo-modules/neo/src/Neo/bin/Release/net8.0/Neo.dll
#41 9.610   RpcServer -> /opt/neo-modules/src/RpcServer/bin/Release/net8.0/RpcServer.dll

To Reproduce

Both with FROM mcr.microsoft.com/dotnet/sdk:8.0.202-jammy or 203

Run dotnet restore and than dotnet publish -c Release -f net8.0 --no-restore -o app in our project https://github.com/neo-project/neo-modules

Exceptions (if any)

Further technical details

#41 0.316 DOTNET INFO
#41 0.400 .NET SDK:
#41 0.400  Version:           8.0.202
#41 0.400  Commit:            25674bb2f4
#41 0.438  Workload version:  8.0.200-manifests.4e94be9c
#41 0.438 
#41 0.438 Runtime Environment:
#41 0.438  OS Name:     ubuntu
#41 0.438  OS Version:  22.04
#41 0.439  OS Platform: Linux
#41 0.444  RID:         linux-x64
#41 0.444  Base Path:   /usr/share/dotnet/sdk/8.0.202/
#41 0.444 
#41 0.444 .NET workloads installed:
#41 0.447 There are no installed workloads to display.
#41 0.451 
#41 0.451 Host:
#41 0.451   Version:      8.0.3
#41 0.451   Architecture: x64
#41 0.451   Commit:       9f4b1f5d66
#41 0.451 
#41 0.451 .NET SDKs installed:
#41 0.451   8.0.202 [/usr/share/dotnet/sdk]
#41 0.451 
#41 0.451 .NET runtimes installed:
#41 0.451   Microsoft.AspNetCore.App 8.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
#41 0.451   Microsoft.NETCore.App 8.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
#41 0.451 
#41 0.451 Other architectures found:
#41 0.451   None
#41 0.451 
#41 0.451 Environment variables:
#41 0.451   Not set
#41 0.451 
#41 0.451 global.json file:
#41 0.451   /opt/neo-modules/global.json
#41 0.451 
#41 0.451 Learn more:
#41 0.451   https://aka.ms/dotnet/info
#41 0.451 
#41 0.451 Download .NET:
#41 0.451   https://aka.ms/dotnet/download

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions