在vs中,当使用Docker调试时,却出现错误:
错误MSB4018“ContainerBuildAndLaunch”任务意外失败。
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Win32.Registry, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 系统找不到指定的文件。
原因是docker desktop中的共享设置有问题,设置 > Resources > File sharing中将C:\Users和项目目录都添加进去后正常。