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

Support for Central Package Management #115

Open
ac931274 opened this issue Jan 27, 2023 · 4 comments
Open

Support for Central Package Management #115

ac931274 opened this issue Jan 27, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request Hacktoberfest help wanted Extra attention is needed

Comments

@ac931274
Copy link

Microsoft is now encouraging the use of Central Package Management (https://devblogs.microsoft.com/nuget/introducing-central-package-management/), this is where the version numbers are stored centrally in a solution for the NuGet packages. When running NuGetDefense on a solution that uses CPM you get the message Warning : Unable to find a version for this package. It will be ignored.. Please can you add support to support CPM.

@ac931274 ac931274 added the enhancement New feature or request label Jan 27, 2023
@digitalcoyote
Copy link
Owner

Absolutely. I'll start looking into this.

@digitalcoyote
Copy link
Owner

I'm still planning on adding this, but I've been dealing with extra hours for my day job (new responsibilities, frameworks, etc...). I'm also prioritizing some existing bugs and documentation. That said. If anyone gets this in a PR before I get to it. I'll definitely consider merging it in.

@digitalcoyote digitalcoyote self-assigned this Mar 20, 2023
@digitalcoyote
Copy link
Owner

OK, so my first draft of how to handle this :

  1. Check for a new Option in the config file for nugetdefense (ex. CentralPackageManagementFilePath) that is a path to the Directory.Packages.props file (absolute or relative to the config file).
  2. Check the directory containnig the projectFile, NuGetDefense.json (config file), and the parent directory of both of those for the Directory.Packages.props file. If it doesn't exist, assume that Central Package Management is not in use.

@digitalcoyote digitalcoyote added the help wanted Extra attention is needed label Dec 13, 2023
@digitalcoyote
Copy link
Owner

I haven't gotten a chance to look at this in months. Anyone willing to look into it would be appreciated. Otherwise I'll try to get to it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest help wanted Extra attention is needed
Projects
Status: To do
Development

No branches or pull requests

2 participants