On my developing machine the installer for Docker for Windows hangs forever. The problem occur from stable version 188.8.131.52 to 184.108.40.206. After a little inspection, i discovered that the installer is waiting for the “Docker Desktop Service”. The log for the service show the error:
…cannot load assembly ‘System.Net.Http, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ …
For the library System.Net.Http there are some version problem. If you take this library from Net Framework 4.6.2 (the framework used by Docker for Windows) this library have the Version=18.104.22.168. If you get this library from Nuget you get a library with version <22.214.171.124 (see this for details). So how to solve?
While the installer still hang, waiting for the service to start, follow this steps:
- go to C:\Program Files\Docker\Docker
- open the file com.docker.service.config
- comment out or delete the part:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-126.96.36.199" newVersion="188.8.131.52" /> </dependentAssembly> </assemblyBinding>
- go to Service Console and start the service “com.docker.service” or “Docker Desktop Service” (the name depend on version)
When the service start the installer complete succesfully. Close the installer. The Docker Service Client also do not start for the same reason, the solution is the same, comment out the same binding redirect in the file Docker Desktop.exe.config.