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

"dotnet list package --include-transitive" should ignore docker project files #12914

Closed
WhitWaldo opened this issue Sep 30, 2023 · 2 comments
Closed
Labels
Functionality:ListPackage dotnet.exe list package Product:dotnet.exe Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:DCR Design Change Request

Comments

@WhitWaldo
Copy link

NuGet Product(s) Affected

dotnet.exe

Current Behavior

I'm trying to follow the steps outlined in the blog post for package source mapping and it suggests that I run dotnet list package --include-transitive to "view all top-level and transitive packages in your solution.

Mine is a solution in which every project will be built as a separate Docker container. When I ran this command, I got the message:

The project <my solution-dir>\docker-compose.dcproj uses package.config for NuGet packages, while the command works only with package reference projects.

That's all fine and good - where's the list of packages?

Desired Behavior

If it encounters a file type it's not compatible with, skip it and keep searching. Instead I get a warning that it's incompatible (and can't do anything about it as I otherwise need the file) and also get no outputs providing me with the desired list.

Further, there should be some way to write this list directly from the command into the nuget.config file in the root of the directory I'm running the command from.

Additional Context

As it stands, I've got too many projects in this solution to try running that command one at a time, so I'm just going to have to pass on fully implementing the package source mapping. Please address the above issue so I might take full advantage of this handy functionality.

Thank you!

@WhitWaldo WhitWaldo added Triage:Untriaged Type:DCR Design Change Request labels Sep 30, 2023
@Nigusu-Allehu
Copy link
Contributor

Nigusu-Allehu commented Oct 4, 2023

Thank you for bringing this to our attention. The order of projects in the solution file (.sln file) plays a role, affecting which projects the command executes for. As a result, sorting them in a way such that <my solution-dir>\docker-compose.dcproj is the last project in the list would avoid the problem. we will take your feedback and work on it, thank you!
Related issue : #12520

Regarding your suggestion to write the list directly into nuget.config, to better address this and gather all necessary specifics, could you kindly raise a separate issue detailing this request?

@nkolev92 nkolev92 changed the title "dotnet list package --include-transitive" should ignore docker files "dotnet list package --include-transitive" should ignore docker project files Oct 9, 2023
@nkolev92
Copy link
Member

nkolev92 commented Oct 9, 2023

Duplicate of #12520.

@nkolev92 nkolev92 closed this as completed Oct 9, 2023
@nkolev92 nkolev92 added the Resolution:Duplicate This issue appears to be a Duplicate of another issue label Oct 9, 2023
@nkolev92 nkolev92 reopened this Oct 9, 2023
@nkolev92 nkolev92 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:ListPackage dotnet.exe list package Product:dotnet.exe Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:DCR Design Change Request
Projects
None yet
Development

No branches or pull requests

3 participants