Home How to Use NuGet on Mono, Part II
Post
Cancel

How to Use NuGet on Mono, Part II

[Update: Microsoft starts to officially support Mono, so please simply use latest NuGet executable such as 3.5]

In part I we see how to get the command line tool running. In this part, we document how to get NuGet package restore working.

So how can we get package restore running, assuming you already have this enable for your solution?

There are several steps needed,

  1. Set the required environment variable,

    1
    
    export EnableNuGetPackageRestore=true
    
  2. Go to .nuget folder and replace NuGet.targets with this new version, http://nuget.codeplex.com/SourceControl/changeset/view/0b1e224884a3#src/Build/NuGet.targets
  3. Copy Microsoft.Build.dll to .nuget folder if you did not yet. (Please refer to part I)
  4. Now the most difficult step comes. Please go to all .csproj/.vbproj files and modify to Now xbuild should be able to help build your solution and ask NuGet to restore packages.

Note that the wrong case issue of NuGet Visual Studio addin has been fixed only in its master branch, and is marked as part of upcoming 2.3 release. We still need to wait for that, and manually edit project files at this moment.

This post is licensed under CC BY 4.0 by the author.
Advertisement

How to Use NuGet on Mono, Part I

How to Use NuGet on Mono, Part III

Comments powered by Disqus.