Loging exception in addition to error message.
Fixing NuGet targets to work in both Windows and Mono.