Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Commented Unassigned: Fixes required to make NuGet work seamlessly on MonoDevelop [3278]

$
0
0
Note: All of this is related to the Visual Studio generated nuget files - I'm sorry if this is the wrong place to report this, in that case please let me know where I should report his.

I'm right now setting up a project under MonoDevelop on OS X and even though NuGet already has some features that should make it work, there are some glitches, which I hope to collect and this issue. A good reference is also mrward/monodevelop-nuget-addin#7

Assuming you're adding NuGet to a solution on Windows/VS, you run into the following issues:

* 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".
* RequireRestoreConsent is false by default: This is a small hurdle and can be easily worked around by the user by either fixing nuget.targets, but is there a better way?
* 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 <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "</RestoreCommand>

```
Unfortunately, this whitespace is required on windows as you'll get a "Illegal Character in Path" exception from msbuild (haven't looked into why that's the case). My hacky workaround:


```
<SolutionDirForPlatform Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</SolutionDirForPlatform >
<SolutionDirForPlatform Condition=" '$(OS)' != 'Windows_NT'">"$(SolutionDir)"</SolutionDirForPlatform >

<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir $(SolutionDirForPlatform)</RestoreCommand>
```
Comments: I've sent a PR: https://nuget.codeplex.com/SourceControl/network/forks/friism/nuget/contribution/4993

Viewing all articles
Browse latest Browse all 7612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>