gpt4 book ai didi

c# - 没有 Package.Config 的 Nuget 包?

转载 作者:行者123 更新时间:2023-11-30 20:26:53 29 4
gpt4 key购买 nike

我遇到了一个解决方案(.Net 完整框架),该解决方案中没有 package.config 并且来自内部 Nuget 服务器的提要。

如果不在 Package.Config 中,包列表在哪里维护?

最佳答案

Where is the list of packages are maintained, if not in Package.Config?

首先,你应该确保你的解决方案已经安装了 nuget 包,一旦你安装了一个包,NuGet 就会将 Package.Config 文件添加到你的项目中,以记录你的依赖项项目文件或 packages.config 文件。

如果您确认您的解决方案安装了 nuget 包,但没有 Package.Config 文件,则您的 nuget 包应使用另一种管理方法:PackageReference

编辑您的项目,您将找到以下 PackageReference 列表:

<ItemGroup>
<PackageReference Include="Contoso.Utility.UsefulStuff" Version="3.6.0" />
</ItemGroup>

参见 NuGet is now fully integrated into MSBuild了解更多详情:

In the past, NuGet packages were managed in two different ways - packages.config and project.json - each with their own sets of advantages and limitations. With Visual Studio 2017 and .NET Core, we have improved the NuGet package management experience by introducing the PackageReference feature in MSBuild. PackageReference brings new and improved capabilities such as deep MSBuild integration, improved performance for everyday tasks such as install and restore, multi-targeting and more.

关于c# - 没有 Package.Config 的 Nuget 包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49408091/

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