豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

PackagePathResolver.GetPackageDirectoryName should be virtual #5700

@albahari

Description

@albahari

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 :)

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions