dotnet restore not restoring nuget packages

I faced an interesting challenge while upgrading to the latest dotnet CLI. We've built an application a while ago in vNext beta4. During the course of the application we migrated up to beta8 and now it was time to upgrade to the latest .NET Framework and to use the latest CLI. Enough of background. Once all the projects were migrated and running we started seeing some weird issues being raised in the build server (TeamCity) even though it was running fine locally. It took me a while to find out what the issue was. Any time I ran the command »