Skip to content

Add NuGet config #1433

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

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Add NuGet config #1433

merged 1 commit into from
Sep 5, 2024

Conversation

manodasanW
Copy link
Member

Adding NuGet.config with public feed that upstreams to NuGet.org per guidance.

@sylveon
Copy link
Contributor

sylveon commented Sep 5, 2024

What about external users? Since this is in the root of the repo, their Visual Studio will end up picking up this feed as well - is this intentional?

@manodasanW
Copy link
Member Author

@sylveon the feed is a public externally accessible feed, so external users should have access to it. Let me know if you don't and I can look into that.

@DefaultRyan
Copy link
Member

It's also worth noting that all the CI tests passed, and they don't have any priveleged access to internal feeds - the CI tests can only access public feeds just like external users.

@sylveon
Copy link
Contributor

sylveon commented Sep 5, 2024

Ah, fair enough then

@manodasanW manodasanW merged commit 2e4bdb0 into master Sep 5, 2024
80 checks passed
@manodasanW manodasanW deleted the manodasanw/nugetconfig branch September 5, 2024 17:22
@walbourn
Copy link
Member

walbourn commented Sep 5, 2024

Note that another solution would be to not have a nuget.config at all and use in YAML:

  - task: NuGetCommand@2
    displayName: NuGet restore
    inputs:
      solution: cppwinrt.sln
      feedRestore: $(GUID_FEED)
      includeNuGetOrg: false

The GUID_FEED is set as a variable so it only gets used by ADO pipelines and not everyone else. GitHub Actions can just use nuget.org directly.

For GitHub Actions, use:

 uses: nuget/setup-nuget@v2

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

Successfully merging this pull request may close these issues.

4 participants