Fixed #11

Moved the code to detect msbuild to the environment phase.
Moved the code to get the latest version of nuget to the environment
phase