Home: Fix NuGet.Config casing

Created on 22 Sep 2015  Â·  15Comments  Â·  Source: NuGet/Home

nuget.exe looks for NuGet.config instead of NuGet.Config. This breaks on linux when using mono and is a regression from 2.8.6.

Bug

Most helpful comment

Sure, just wanted to make sure that we'll eventually move to a standardized nuget.config everywhere and support the other casings just as a fallback.

All 15 comments

Related: https://github.com/aspnet/dnx/issues/2747

On Linux, DNX looks for multiple casings of nuget.config and picks the first one that matches:

  1. nuget.config
  2. NuGet.config // v3 behavior
  3. NuGet.Config // v2 behavior

DNX isn't going to be able to use NuGet's configuration code until we get something done to fix this. Is there an ETA on it? #1847 is blocked on it because we need to switch to NuGet.Configuration to fix it and we can't because Linux behavior is broken :(.

We're already punting the bug out to RC1, so we've got a few weeks, but I wanted to raise the profile of this bug a little so it can be fixed in time.

/cc @muratg @davidfowl @emgarten @yishaigalatzer

cc @Eilon

I've updated the constant to the original NuGet.Config casing.
NuGet/NuGet3@39c7f5173f5acc5999fc7aaea436df449e72cce9

Why not use nuget.config? NuGet.Config is incredibly easy to mess up on a case sensitive platform.

Because that was how it always worked. Changing it is a breaking change.

The current change will break DNX builds - https://github.com/aspnet/dnx/commit/8e31f4f61e8960544e0f9e63c152e00725e187e3 (NuGet.Config → NuGet.config)

If the intent is to not break, then just supporting multiple casings would be the appropriate fix.

The ask came from your team, to revert back to what it always was.

CC @davidfowl

@pranavkm please verify this is fixed.

@yishaigalatzer what's the verdict on this one? did you standardize on nuget.config as the default (with fallback for the other casings) like in DNX?

I still see other casings in the codebase: https://github.com/NuGet/NuGet3/blob/fdf204fa74ab3a336eb0ce11ac4eb0e87309bb0d/src/NuGet.Configuration/Settings/Settings.cs#L24

That is the standard (with that casing), but we allow for all lowercase. Obviously it doesn’t matter on windows, and does a very small “performance damage” on case sensitive file systems.

The case is as such, because that is what it was in Nuget 2.8.X so minimal breaking changes.

From: Alexander Köplinger [mailto:[email protected]]
Sent: Wednesday, October 14, 2015 2:24 AM
To: NuGet/Home [email protected]
Cc: Yishai Galatzer [email protected]
Subject: Re: [Home] Fix NuGet.Config casing (#1427)

@yishaigalatzerhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fyishaigalatzer&data=01%7c01%7cyigalatz%40microsoft.com%7cc8529e49887f4d82471608d2d4793a97%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=LVhKg71fSPWr%2fsRKCQzMZPCUm7fqOhZFlCB6q08%2bPV8%3d what's the verdict on this one? did you standardize on nuget.config as the default (with fallback for the other casings) like in DNX?

I still see other casings in the codebase: https://github.com/NuGet/NuGet3/blob/fdf204fa74ab3a336eb0ce11ac4eb0e87309bb0d/src/NuGet.Configuration/Settings/Settings.cs#L24https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fNuGet3%2fblob%2ffdf204fa74ab3a336eb0ce11ac4eb0e87309bb0d%2fsrc%2fNuGet.Configuration%2fSettings%2fSettings.cs%23L24&data=01%7c01%7cyigalatz%40microsoft.com%7cc8529e49887f4d82471608d2d4793a97%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=DsFnACwjakKkKgrDrNyBSvn%2fPGx8ZzC1QTYqntbR3sw%3d

—
Reply to this email directly or view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2fNuGet%2fHome%2fissues%2f1427%23issuecomment-147987579&data=01%7c01%7cyigalatz%40microsoft.com%7cc8529e49887f4d82471608d2d4793a97%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=XHcSLq5wu6N4BHZqPNRLcuBh1z0eIhhefGFasJ3ewWA%3d.

@yishaigalatzer DNX goes a different route though, they are looking for nuget.config by default on all platforms with the fallback for the other casings on !Windows and standardizing on nuget.config across their repos. That is the way to go IMHO, so would be great if NuGet proper could follow this (there are no breaking changes as well with this approach).

Well, NuGet is RTM, DNU is not. So we need to be a bit careful with this.

We are going to merge the two eventually into one codebase, when that happens we can make more changes.

Right now there are no functional differences, so I don’t know that we need to spend more time on this.

Sure, just wanted to make sure that we'll eventually move to a standardized nuget.config everywhere and support the other casings just as a fallback.

Yup

Was this page helpful?
0 / 5 - 0 ratings