Question: I tried to solve this with logarithm rules:

O(n^2) = 2^O(log(n^2)) 

c\*n^2 = 2^log(n^2c)

Im not sure that is true?

Answer: 
I had similar problem and fixed it when I changed the "start-up project" from another module to the module containing references to all other projects in the solution. 
Right-click module >> click "Set as StartUp Project"
Diego's answer is correct.

This problem occurs when there is no connection string in project marked as startup project. Then EF tries to connect to some default database engine to perform update. In my case it tried to use express, and for some reason it couldn't connect. And the error was thrown.

Run your "update-database" with option "-Verbose". One of the lines there shows which StartUp project is used. Check your connection string in this project, or change the startup project to the one that has correct connection string. That solves the problem.