Add alternative casings for finding NuGet.config file.#7549
Add alternative casings for finding NuGet.config file.#7549akoeplinger merged 1 commit intodotnet:mainfrom
Conversation
| <RestoreConfigFile Condition="Exists('$(RepoRoot)NuGet.config')">$(RepoRoot)NuGet.config</RestoreConfigFile> | ||
| <RestoreConfigFile Condition="Exists('$(RepoRoot)NuGet.Config')">$(RepoRoot)NuGet.Config</RestoreConfigFile> | ||
| <RestoreConfigFile Condition="Exists('$(RepoRoot)nuget.config')">$(RepoRoot)nuget.config</RestoreConfigFile> |
There was a problem hiding this comment.
To bad this cant be made to not care about the casing on the file name at all so one that haves the name and extension in all caps can still be able to use it.
If only nuget could also be updated to not care on it's name case as well too.
There was a problem hiding this comment.
I wonder if we still need this at all since NuGet will automatically pick up the nuget.config in the repo root.
Looking at the history, this was used to make sure NuGet wouldn't pick up a file outside of the repo root (presumably because some repos didn't have one?) but this shouldn't be a supported scenario anymore now that we require using the AzDO feeds.
There was a problem hiding this comment.
Specifically, this is still required for source-build because some of our contributing repos use different filename casings. We are patching to work around this but it would be really nice to actually have it in Arcade.
|
@tmat @akoeplinger Could we try to get this in? It's come up again as the Homebrew folks are trying to bring up source-build on OSX and that uses a case-insensitive filesystem so our patch to "correct" the filename fails. |
|
Thanks! |
This allows us to find
NuGet.configfiles that are namedNuGet.Configornuget.config, all of which are supported by NuGet. In particular,nuget.configis actually the recommended casing for new projects on Linux so this may be increasingly common.I didn't add an error condition when none of these are found because Arcade does not always need to work with NuGet.config, so this defers the error to when it actually causes a problem.