将 nuget 安装到包名称以外的目录

Have nuget install to directory other than package name

关于安装到自定义目录有几个问题。但是,这些目录都附加了包名称以保存包内容。例如,如果我使用 /lib/customPackagePath 的自定义路径安装 package1.0,它会进入 /lib/customPackagePath/package1.0/.

我想要的是将它放入 /lib/customPackagePath/package/ 中,这样当我想继续使用此包的新版本时,我不必更新对 [=11= 中内容的所有引用] 到 /lib/customPackagePath/package2.0/ 因为 package2.0 将安装到 /lib/customPackagePath/package/ 就像 package1.0.

如何告诉 nuget 使用自定义目录并更改安装它的包名称?

查看 -ExcludeVersion nuget install:

-ExcludeVersion: If set, the destination directory will contain only the package name, not the version number