NuGet Package Restore in MonoDevelop on OSX/Linux

后端 未结 1 1960
独厮守ぢ
独厮守ぢ 2021-02-04 14:38

I\'m trying to compile a Visual Studio project with NuGet package restore under MonoDevelop but it\'s not working out of the box.

NuGet should work on Mono and there\'s

1条回答
  •  独厮守ぢ
    2021-02-04 15:12

    Based on issue tracked here: https://nuget.codeplex.com/workitem/3278

    1. You must use xbuild with all projects that should restore packages on build. MonoDevelop->Preferences->Build Enable xbuild in MonoDevelop or Xamarin Studio
    2. Unix filesystems are case-sensitive. This breaks nuget.targets as the casing inside the file is assumed to be all lower case whereas the files added to a solution in the .nuget folder are cased like "NuGet". Either fixup nuget.targets or change the filenames in your solutions .nuget folder to all lower case.
    3. RequireRestoreConsent is true by default in nuget.targets. Edit nuget.targets and change it to false.
    4. Package restore puts the package folder in a weird location, $(SolutionDir)/ /packages (yes, theres a single whitespace folder in between). The reason is that there's a trailing whitespace in nuget.targets in after $(SolutionDir) in $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "

    0 讨论(0)
提交回复
热议问题