Remco;13473 wrote:We try to handle these sorts of situations but generally don't want to make big sacrifices for them (i.e. if we cut load time performance by 15% just to fix this issue, it just isn't worth it).
Sure, I understand that. I hope you'll manage to fix it without sacrificing performance.
BTW we use the "repositoryPath" setting in NuGet because it's the only viable way to work with projects (in the old format) that are referenced from multiple solutions in different directories. If you don't define a single packages directory, you'll have issues when installing packages from different solutions - it's not handled very well by VS as I suppose it has a similar issue in identifying package imports. I'd say I'm surprised no one reported this issue before, but I've been using the "Additional files to include" feature for a long time without noticing the "Auto-Detect NuGet Build Dependencies" feature even existed.
Remco;13473 wrote:I've added the Antlr4 item type to NCrunch's auto inclusion list. So this will be automatically handled from the next release.
Thanks! But it's still a special-case solution for a single package, and you'd need to also include "Antlr4Tokens" and "Antlr4AbstractGrammar" to
fully support this single package. It's a popular package but I suppose you don't want to do such special cases for everything. Do you think you could feed NCrunch's auto inclusion list from "AvailableItemName" MSBuild items instead? That would solve the issue in the general case.
See
here for the ANTLR example - I suppose the condition on BuildingInsideVisualStudio could be removed if needed - I'm not sure why it's here in the first place.
Remco;13473 wrote:Greedily adding all files in a project's directory is something we've tried before and found it caused more problems than it solved. So we take a conservative approach here.
I see, but I'd be more interested in that "AvailableItemName" thing than greedily bringing all the files.
The new project format already brings most of the files anyway, but the issue arises because you need to remove the file from "None" items in order for VS to play nice with your custom item type.