The new package restore workflow doesn't work on Mono when using an SLN file, i.e. invoking
nuget.exe -restore MySolution.sln
returns: "An exception was thrown by the type initializer for NuGet.Common.Solution"
After digging into the source code (specifically
), it turns out that NuGet uses an internal MSBuild class for parsing SLN files,
, which is not available on Mono.
It appears that NuGet only needs to parse the SLN to find paths to project-level packages.config files, which IMHO shouldn't require relying on invoking an internal class via reflection.
Restoring packages by specifying the packages.config file works fine on Mono.
Ubuntu Server 12.10