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

read packages from packages.config #17

Merged
merged 4 commits into from
Jan 2, 2024

Conversation

notofug
Copy link
Collaborator

@notofug notofug commented Dec 22, 2023

Attempt to solve #15

Might be too naive but seem to work OK for initial test, please have a look and tell me what you think.

@notofug notofug force-pushed the support_packages.config_projects branch from dd12eff to 25c03c0 Compare December 22, 2023 13:28
Copy link
Owner

@sensslen sensslen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the code you propose does not work properly. We offer a flag that allows to also print transitive dependencies (see https://devblogs.microsoft.com/nuget/introducing-transitive-dependencies-in-visual-studio/ for more information). The issue is that transitive dependencies are not considered for packages specified in packages.config.

To verify this works correctly, please add at least one additional integration test that checks that transitive dependencies are indeed followed.

Also I would love if you could use as much tooling already available instead of implementing the xml parsing on your own.... --> See https://stackoverflow.com/questions/33035704/how-to-read-the-list-of-nuget-packages-in-packages-config-programatically for an example

Copy link
Owner

@sensslen sensslen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution. Unfortunately there are currently two issues I see. Would you mind fixing these?

There are formatting issues.....
These can be resolved very easily by running dotnet format [path to solution]

Also there is an error 'ManagementClass' is only supported on: 'windows'

@notofug
Copy link
Collaborator Author

notofug commented Dec 27, 2023

There are formatting issues..... These can be resolved very easily by running dotnet format [path to solution]
Also there is an error 'ManagementClass' is only supported on: 'windows'

I tried to isolate the use of ManagementClass to windows-builds only, which makes sense since msbuild c++ projects are locked to windows anyway as far as I am aware of. In fact this part of the PR deals explicitly with supporting c++ - projects, since such projects are limited to using 'packages.config' - style if using nuget.
Please check if this change fixes the build issue

@sensslen
Copy link
Owner

Ok, so there are still test failures - can you please run the tests locally to fix all of them?

@notofug
Copy link
Collaborator Author

notofug commented Dec 28, 2023

I had to move the file-reading to a wrapper-class in order to satisfy the 'architectural test', please check if that makes sense or we should attack it in another way? (Tests seem to pass locally now at least ;-))

Copy link
Owner

@sensslen sensslen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

Copy link

sonarcloud bot commented Dec 28, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sensslen sensslen merged commit 9358571 into sensslen:main Jan 2, 2024
8 checks passed
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.

2 participants