none
Windows-Container-based MicroService Dev environment on Windows server 2016 + Visual Studio 2017 RRS feed

  • Question

  • I tried to setup the development environment in windows server 2016 with Visual Studio 2017, I got the errors below when build the default solution, any idea for this issue?

    I know the official recommendation is development environment should be on Windows 10 while testing/prod environment should be deployed on Windows server 2016, but right now I only have windows server 2016, no windows 10.

    1>docker-compose -f "C:\Users\server_admin\Documents\Visual Studio 2017\Projects\WebApplication4\docker-compose.yml" -f "C:\Users\server_admin\Documents\Visual Studio 2017\Projects\WebApplication4\docker-compose.override.yml" -f "C:\Users\server_admin\Documents\Visual Studio 2017\Projects\WebApplication4\docker-compose.vs.release.yml" -p dockercompose4219315891 up -d –no-build
    1>Creating network "dockercompose4219315891_default" with the default driver
    1>HNS failed with error : The parameter is incorrect.
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: The "PrepareForLaunch" task failed unexpectedly.
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose4219315891_default" with the default driver
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : The parameter is incorrect. .
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018:
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting —> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose4219315891_default" with the default driver
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : The parameter is incorrect.
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at Microsoft.DotNet.Docker.DockerComposeClient.<ExecuteAsync>d__18.MoveNext()
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: — End of inner exception stack trace —
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at Microsoft.DotNet.Docker.DockerComposeClient.<ExecuteAsync>d__18.MoveNext()
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: — End of stack trace from previous location where exception was thrown —
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at Microsoft.DotNet.Docker.DockerWorkspace.<PrepareForLaunchAsync>d__14.MoveNext()
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: — End of stack trace from previous location where exception was thrown —
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
    1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
    1>Done building project "docker-compose.dcproj" — FAILED.

    This is the results of runing the docker-compose in CLI:

    PS C:\Users\server_admin> docker-compose -f "C:\Users\server_admin\Documents\Visual Studio 2017\Projects\WebApplication4\docker-compose.yml" -f "C:\Users\server_admin\Documents\Visual Studio 2017\Projects\WebApplication4\docker-compose.override.yml" -f "C:\Users\server_a
    dmin\Documents\Visual Studio 2017\Projects\WebApplication4\docker-compose.vs.release.yml" -p dockercompose4219315891 up
    WARNING: The DOCKER_BUILD_SOURCE variable is not set. Defaulting to a blank string.
    Creating network "dockercompose4219315891_default" with the default driver
    ERROR: HNS failed with error : The parameter is incorrect.

    Docker version info:

    PS C:\Users\server_admin> docker version
    Client:
     Version:      17.03.1-ee-3
     API version:  1.27
     Go version:   go1.7.5
     Git commit:   3fcee33
     Built:        Thu Mar 30 19:31:22 2017
     OS/Arch:      windows/amd64

    Server:
     Version:      17.03.1-ee-3
     API version:  1.27 (minimum version 1.24)
     Go version:   go1.7.5
     Git commit:   3fcee33
     Built:        Thu Mar 30 19:31:22 2017
     OS/Arch:      windows/amd64
     Experimental: false

    Thursday, August 3, 2017 8:36 AM

All replies

  • Actually I saw the network(dockercompose4219315734_netw) had been created successfully:

    PS C:\Users\server_admin> docker network ls
    NETWORK ID          NAME                           DRIVER              SCOPE
    77e56191276f        dockercompose4219315734_netw   nat                 local
    35a7b38df5a1        nat                            nat                 local
    014f5cb2111b        none                           null                local

    Thursday, August 3, 2017 8:41 AM