gpt4 book ai didi

c# - ASP.NET Core 中的 NuGet 包位置在哪里?

转载 作者:IT王子 更新时间:2023-10-29 04:24:18 25 4
gpt4 key购买 nike

我是 ASP.NET Core 的新手,我想弄清楚 NuGet 包在我的本地计算机上的存储位置。

我已经安装了以下 NuGet 包:

nuget dapper 
nuget MicroOrm.Pocos.SqlGenerator

我想用我自己的编译版本替换其中一个 DLL,但我不知道该放在哪里。 Dependencies 文件夹不显示任何内容。

最佳答案

对于 project.json nuget 目录位于用户配置文件文件夹中 (%UserProfile%\.nuget\packages)

更新

来自 msdn

The global-packages folder is where NuGet installs any downloaded package. Each package is fully expanded into a subfolder that matches the package identifier and version number. Projects using the PackageReference format always use packages directly from this folder. When using the packages.config, packages are installed to the global-packages folder, then copied into the project's packages folder.

使用 PackageReference 时,globalPackagesFolder 配置值来自 nuget.config用来。默认值为:

Windows:%userprofile%\.nuget\packages

Mac/Linux:~/.nuget/packages

使用 packages.config 时,repositoryPath 配置值来自 nuget.config用来。默认值为:

$(Solutiondir)/packages

两个位置(globalPackagesFolderrepositoryPath)都可以被覆盖使用 NUGET_PACKAGES 环境变量。环境变量优先于配置设置。

关于c# - ASP.NET Core 中的 NuGet 包位置在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40902578/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com