admin管理员组

文章数量:1131224

I’m trying to run my Visual Studio project in a container (dockerfile), but I'm getting the following error:

2>C\Users\user\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.21.0\build\Container.targets(217,5): error MSB4018: The "ContainerBuildAndLaunch" task failed unexpectedly.
2>C\Users\user\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.21.0\build\Container.targets(217,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken={token}' or one of its dependencies. The system cannot find the file specified.
2>C\Users\user\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.21.0\build\Container.targets(217,5): error MSB4018: File name: 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken={token}'
2>C\Users\user\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.21.0\build\Container.targets(217,5): error MSB4018:    at Microsoft.VisualStudio.Containers.Tools.Common.Client.DockerPathHelper.FindDockerCliPath()
2>C\Users\user\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.21.0\build\Container.targets(217,5): error MSB4018:    at Microsoft.VisualStudio.Containers.Tools.Common.Prerequisites.DockerForWindowsDriveSharingPrerequisite.<EvaluateAsync>d__0.MoveNext()

I have tried:

  • Updating Visual Studio
  • Clearing then restoring all nuget packages
  • Reinstalling Docker Desktop

本文标签: dockerfileMissing MicrosoftWin32RegistryStack Overflow