Support all three nuget.config name formats for greater cross platform consistency
See original GitHub issueDescription:
NuGet supports nuget.config
, NuGet.config
, and NuGet.Config
for the casing of the config file. This action only supports nuget.config
which gives unexpected results when setting up package feeds, and when sharing workflows across OSes. A note should also be included in the readme mentioning the config file names supported since they matter.
Justification:
If you use NuGet.config
and build on Ubuntu, depending on the sources in it, you end up getting a number of different build errors because the source wasn’t found, it can’t be since nuget.config
doesn’t exist. This leads to very confusing errors about packages not being found in feeds they don’t belong to and/or GPR requests not being authenticated.
Even though nuget.config
is the current preferred format (dotnet new nugetconfig
uses it now for cross platform consistency), all three are officially supported by the nuget client and have been the preferred format at various points in time.
- None of the dotnet/* repos use the lowercase version.
- A general search shows how common it is to not use the lowercase version.
- Even https://github.com/actions/runner/blob/main/src/NuGet.Config isn’t lowercase.
- The nuget docs use all three formats, leading you to think the casing isn’t important, which is confirmed when you restore/build successfully.
- The format doesn’t seem to matter for Dependabot in my testing.
Are you willing to submit a PR?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top GitHub Comments
I’m busy the rest of the week but I’ll try to get a repro setup over the weekend for this.
https://github.com/actions/setup-dotnet/issues/182#issuecomment-825523465