Visual Studio 2017 : client version 1.22 is too old

简介:

使用Vs2017 编译 eShopOnContainers-ServicesAndWebApps 时,报了错误:

Microsoft.DotNet.Docker.CommandLineClientException: client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version.

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.DockerComposeClient.<ExecuteAsync>d__18.MoveNext()
    --- End of inner exception stack trace ---
    at Microsoft.DotNet.Docker.DockerComposeClient.<ExecuteAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.DockerComposeClient.<DownAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.DockerWorkspace.<PrepareForLaunchAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()    docker-compose    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets    192

Visual studio 2017 给出的解决方案并不对,正确的操作方式如下:

首先使用docker-compose version 看下具体的版本信息,我的windows server 2016 服务器的信息如下:

C:\Users\geffzhang>docker-compose version
docker-compose version 1.14.0, build c7bdf9e3
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016

把下面的文件的Vesion 从2 改成3 就可以了,https://docs.docker.com/compose/compose-file/

docker-compose.ci.build.yml
docker-compose.yml

本文来自云栖社区合作伙伴“doNET跨平台”,了解相关信息可以关注“opendotnet”微信公众号

目录
相关文章
|
6月前
Visual Studio 2022 中VLD库如何安装
Visual Studio 2022 中VLD库如何安装
732 1
|
6月前
Visual Studio 2022 中VLD库如何安装
Visual Studio 2022 中VLD库如何安装
704 0
|
5月前
|
IDE 开发工具 C语言
Visual Studio 2017 安装及使用(新手)
Visual Studio 2017 安装及使用(新手)
1198 0
|
4月前
|
弹性计算 自然语言处理 Windows
通义灵码 Visual Studio 下载安装指南(附安装包)
本安装步骤适用于 Windows 10 及以上操作系统中安装和使用通义灵码。
131642 20
|
4月前
|
前端开发 JavaScript 开发工具
|
5月前
|
JSON 开发工具 C语言
编程入门(五)【Visual Studio Code安装与C/C++语言运行】
编程入门(五)【Visual Studio Code安装与C/C++语言运行】
757 0
|
5月前
|
C++ Windows
Visual Studio 2022安装详解教程
Visual Studio 2022安装详解教程
838 0
|
6月前
|
C++ Windows
手把手教你安装 Visual Studio 2022 及其简单使用
手把手教你安装 Visual Studio 2022 及其简单使用
768 0
|
6月前
|
编译器 C语言 C++
visual studio的安装及scanf报错的解决
visual studio的安装及scanf报错的解决
661 0