Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Flag references to DLL's where a packaged DLL is available #6

Open
galaktor opened this issue Nov 23, 2012 · 4 comments
Open

Flag references to DLL's where a packaged DLL is available #6

galaktor opened this issue Nov 23, 2012 · 4 comments

Comments

@galaktor
Copy link

It would be great to detect when a project is referencing a (non-package) DLL that is also available in a package. Would be particularly useful in cases where I might have updated one project to a new nuget version, but not another - I could end up mixing the DLL's in the output on build.

Not sure how much this might collide with actual use cases supported by NuGet where people may want to have several versions of a package installed side-by-side - however I cannot really imagine why somebody would intend to do so.

@citizenmatt
Copy link
Member

Yeah, I'd like to see this, but I'm not sure how to present this information to the user - normally this kind of thing is an error in a file, but there isn't really a file to analyse and display an error for. It could be an error in packages.config, but you won't see that unless you're in the file, or have solution wide analysis switched on. Would that be good enough? And what to do if packages.config hasn't been created?

And the same kind of concerns are there for when the project isn't using the latest version. It's more of a warning than an error, but how do you tell the user?

Any ideas?

@JamesKovacs
Copy link

The most obvious would be a warning squiggly with hover-tip in the References folder of Solution Explorer, but I don't know if you can decorate nodes in the Solution Explorer. Anyone know if this can be done?

@galaktor
Copy link
Author

I see how finding the right place for a warning might be tricky. I generally use solution-wide analysis, so that would work for me.

I'd even be happy if it was an on-demand feature I could run to clean up my references, similar to (the incredibly useful) "Remove Unused References". Where there are DLL's in use that are available in a package, show them in a list with checkboxes (as with unused refs) and on OK set the project to use package DLL's instead.

Now that I think of it, this feature indeed feels very similar to "Remove unused refs", except that it's "Use package refs where available".

@galaktor
Copy link
Author

Also, there's a yellow exclamation mark warning that shows up on references when there is a problem with them (i.e. when the DLL is missing, or when the MSBuild "Condition" is invalid in the csproj).

However I have no idea how easy or hard it is to display that.

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

No branches or pull requests

3 participants