Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Guidance 2022.2.1.14) Suboptimal Nuget.Config file is added to new projects #242

Open
HaGGi13 opened this issue May 14, 2024 · 1 comment

Comments

@HaGGi13
Copy link

HaGGi13 commented May 14, 2024

Describe the bug

A new project generated by the Guidance adds a sub-optimal Nuget.Config file. It's pointing to a very old and outdated NuGet protocol version 2 on the only defined package source.
This is done by using the attribute protocolVersion, in concrete protocolVersion="2".
NuGet is smart enough that if the packet feed ends in .json, it uses protocol v3, but if it does not end in .json, it uses the old protocol v2.

Example of NuGet protocol v3 compliant URL:

  • https://my-package-store/my-feed/v3/index.json

Example of NuGet protocol v2 (not v3) compliant URL:

  • https://my-package-store/my-feed

In addition, I suggest to rename the Nuget.Config file to NuGet.config or nuget.config file, to have it somehow consistent. IMHO file extensions should never contain upper letters, but this is just my esthetic thinking and has no deeper functional meaning. 😬😄✌️

To Reproduce

Steps to reproduce the behavior:

  1. Create blank solution
  2. Create Arc4u AspNetCore Solution => 2022.2.1 via solution explorer context menu
  3. Check added Nuget.Config file in directory ~\Solution1\.nuget

Expected behavior

It's a NuGet.config or nuget.config file generated that does not specify any NuGet protocol version to use. Meaning it does not contain the attribute protocolVersion.
NuGet will handle this by its own, depending the package source URI.

Screenshots

image

Desktop (please complete the following information)

  • Visual Studio v17.9.2
  • NuGet v6.9.1
  • .NET SDK v8.0.200
  • Guidance v2022.2.1.14
  • Arc4u v8.1.0

Additional context

For more details about the NuGet.config file specification (and the protocolVersion attribute), please check the MSDocs.

@GFlisch
Copy link
Owner

GFlisch commented Jun 7, 2024

The feed will be changed in the current template with the protocol version 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants