PackagePathResolver.GetPackageDirectoryName should be virtual #5700
Labels
help wanted
Considered good issues for community contributions.
Triage:NeedsTriageDiscussion
Type:DCR
Design Change Request
Milestone
I am the author of LINQPad - a popular code scratchpad which has integrated support for NuGet. I'm in the process of upgrading LINQPad's NuGet support from NuGet 3.x to NuGet 4.x.
I've run into a blocking issue: the methods in PackagePathResolver used to be virtual in NuGet 3.x and they are non-virtual in NuGet 4.x, so my subclassed PackagePathResolver no longer compiles. I need PackagePathResolver.GetPackageDirectoryName to be virtual so that I can override this method to encode the name when it exceeds a certain length. This is an essential workaround to avoid "path too long" errors. These errors occur more frequently in LINQPad than VS, because a long root directory is required (this is a a consequence of LINQPad having a snippet-based architecture rather than a project-based architecture).
Let me know if I should submit a pull request. It's simply a matter of inserting "virtual" before that method declaration - and LINQPad will then enjoy NuGet 4.x integration :)
The text was updated successfully, but these errors were encountered: