question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support all three nuget.config name formats for greater cross platform consistency

See original GitHub issue

Description:

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.

  1. None of the dotnet/* repos use the lowercase version.
  2. A general search shows how common it is to not use the lowercase version.
  3. Even https://github.com/actions/runner/blob/main/src/NuGet.Config isn’t lowercase.
  4. The nuget docs use all three formats, leading you to think the casing isn’t important, which is confirmed when you restore/build successfully.
  5. The format doesn’t seem to matter for Dependabot in my testing.

Are you willing to submit a PR?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
xt0rtedcommented, Apr 7, 2021

I’m busy the rest of the week but I’ll try to get a repro setup over the weekend for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nuget.config File Reference - Microsoft Learn
nuget.config is an XML file containing a top-level <configuration> node, which then contains the section elements described in this topic. Each ...
Read more >
dotnet tool install have trouble installing when an private feed ...
I tried 'dotnet tool install -g sourcelink', and have in the the global nuget.config the company nuget feed from vsts. C:\Program Files\dotnet\ ...
Read more >
Managing Dependencies in .NET: .csproj, .packages.config ...
Get an overview of the artifacts involved in .NET dependency management, how they interact, and how to use them.
Read more >
How to get the nuget cache folder location programmatically
Install nuget package NuGet.Configuration to your project; Add using NuGet.Configuration at the top of your file; Use the following code(which nuget.exe ...
Read more >
Configuring basic system settings Red Hat Enterprise Linux 8
If you require additional support for Ansible, contact Red Hat to learn more about the Ansible Automation Platform subscription. Important.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found