gpt4 book ai didi

package - Nuget更新无法正常工作

转载 作者:行者123 更新时间:2023-12-01 22:24:51 24 4
gpt4 key购买 nike

我想要更新解决方案文件中使用的 Nuget 包,目前,我正在使用以下命令来更新 Nuget 包。

NuGet restore <projectPath> [options]

引用:https://learn.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference#restore

If no solution file, packages.config, or project.json is found, NuGet gives an error.

Reference: https://learn.microsoft.com/en-us/nuget/tools/nuget-exe-cli-reference#remarks

但问题是我使用的是 packages.ProjectName.Config 而不是 packages.config 文件。因此 NuGet 更新无法正常工作。

Note: Similarly if the folder contains multiple project and solution files the NuGet update is not working.

请建议如何解决这个问题?

Edit:Initially I thought the packages.[projectname].config usage in my source is the reason for NuGet packages restoring but later I found that NuGet packages are not even properly restored with packages.config files.

我的源代码中不仅有解决方案和项目文件,删除其他项目后,NuGet 恢复在我的源代码中正常工作。

Is having more than one solution file is the reason for Nuget not updating? Anyone faced the problems , Any help to overcome this issue will be useful.

最佳答案

Nuget 还原需要 Visual Studio 解决方案文件、packages.config 文件或 project.json 文件。

请参阅remarks因为它的行为。

关于package - Nuget更新无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42946799/

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