提问人:Abbas 提问时间:10/31/2023 最后编辑:Abbas 更新时间:11/8/2023 访问量:44
“ComposeBuild”任务意外失败
The "ComposeBuild" task failed unexpectedly
问:
我能够从 Visual Studio 2017 运行该项目,但今天它抛出错误:“ComposeBuild”任务意外失败。MSB4018
我正在使用 docker compose 进行调试。尚未更新任何 dll 或任何其他软件。如果我还应该提及任何其他信息,请告诉我。 我正在尝试运行该应用程序。以前,我能够使用 docker 运行应用程序。但现在它抛出错误Visual Studio 2017。以前我能够运行该应用程序(仅显示登录页面而无法登录)
8>docker-compose -f "C:\Users\PC\Desktop\docker test\ProjectName\docker-compose.yml" -f "C:\Users\PC\Desktop\docker test\ProjectName\docker-compose.override.yml" -p dockercompose4638684849569519100 --no-ansi build --no-cache
8>option '--no-ansi' is DEPRECATED ! Please use '--ansi' instead.
8>#1 [internal] load .dockerignore
8>#1 transferring context: 33B 0.0s
8>#1 transferring context: 35B 0.0s done
8>#1 ...
8>#2 [internal] load build definition from Dockerfile
8>#2 transferring dockerfile: 32B 0.1s done
8>#2 DONE 0.7s
8>#1 [internal] load .dockerignore
8>#1 DONE 1.1s
8>#3 [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim
8>#3 ...
8>#4 [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:3.1-buster
8>#4 ERROR: failed to do request: Head "https://mcr.microsoft.com/v2/dotnet/core/sdk/manifests/3.1-buster": Failed to lookup host: mcr.microsoft.com
8>#3 [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim
8>#3 ERROR: failed to do request: Head "https://mcr.microsoft.com/v2/dotnet/core/aspnet/manifests/3.1-buster-slim": Failed to lookup host: mcr.microsoft.com
8>------
8> > [internal] load metadata for mcr.microsoft.com/dotnet/core/sdk:3.1-buster:
8>------
8>------
8> > [internal] load metadata for mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim:
8>------
8>failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to do request: Head "https://mcr.microsoft.com/v2/dotnet/core/sdk/manifests/3.1-buster": Failed to lookup host: mcr.microsoft.com
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: The "ComposeBuild" task failed unexpectedly.
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: File name: 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.VisualStudio.Containers.Tools.Common.Prerequisites.DockerForWindowsDriveSharingPrerequisite.<EvaluateAsync>d__0.MoveNext()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.VisualStudio.Containers.Tools.Common.Prerequisites.DockerForWindowsDriveSharingPrerequisite.EvaluateAsync(CancellationToken cancellationToken)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Docker.Prerequisites.DockerForWindowsDriveSharingPrerequisite.<EvaluateAsync>d__3.MoveNext()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Docker.Prerequisites.DockerCompositePrerequisite.<EvaluateAsync>d__2.MoveNext()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Docker.BuildTasks.DockerBuildTask.<EvaluateBuildPrerequisitesAsync>d__32.MoveNext()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Docker.BuildTasks.DockerBuildTask.<ExecuteAsync>d__30.MoveNext()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: --- End of stack trace from previous location where exception was thrown ---
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Docker.BuildTasks.DockerBuildTask.Execute()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018:
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: WRN: Assembly binding logging is turned OFF.
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
8>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): error MSB4018:
8>Done building project "docker-compose.dcproj" -- FAILED.
========== Rebuild All: 7 succeeded, 1 failed, 0 skipped ==========
答: 暂无答案
评论