首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >VIsual Studio 2022被困在恢复Nuget包上

VIsual Studio 2022被困在恢复Nuget包上
EN

Stack Overflow用户
提问于 2022-08-01 00:50:30
回答 1查看 1.4K关注 0票数 1

我有和这里的人一样的问题:

Visual被困在“恢复解决方案包”上

我尝试以下几点:

  1. 从“工具”菜单中清除nuget缓存。以及运行命令中的% temp %文件夹。
  2. 从这里清除可视工作室缓存。C:\Users\Dell\AppData\Roaming\Microsoft\VisualStudio\17.0_27e1b93f
  3. 清除.vs隐藏的解决方案文件夹。
  4. 清理和重建解决方案。但被困在修复Nuget包装.)
  5. 我等15分钟。但什么都没发生..。(这里有窃听器吗?)
  6. 我只使用来自nuget.org的不到7个nuget包

下面是日志:

代码语言:javascript
运行
复制
Microsoft Visual Studio Community 2022
Version 17.2.6
VisualStudio.17.Release/17.2.6+32630.192
Microsoft .NET Framework
Version 4.8.03761

Installed Version: Community

.NET Core Debugging with WSL   1.0
.NET Core Debugging with WSL

ASP.NET and Web Tools 2019   17.2.393.26812
ASP.NET and Web Tools 2019

Azure App Service Tools v3.0.0   17.2.393.26812
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools   17.2.393.26812
Azure Functions and Web Jobs Tools

BusinessObjectEditor   1.0
Information about my package

C# Tools   4.2.0-4.22281.5+8d3180e5f00d42f0f0295165f756f368f0cbfa44
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

CreateLayoutWizard   1.0
Create layout wizard.
   
Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager   6.2.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.0.0.2218101+885a343b00bcab620a90c1550c37dafd730ce984
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.0.62204.01010
Microsoft SQL Server Data Tools

TypeScript Tools   17.0.10418.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.2.0-4.22281.5+8d3180e5f00d42f0f0295165f756f368f0cbfa44
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.1.0-beta.22329.1+702b8e77f5fbfe21e6743324c1750503e02f182d
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

更多资料:

  1. 我使用旧的*.csproj项目模板(非sdk)
  2. 我使用的是PackageReference而不是packages.config
  3. .NET 4.8
  4. Windows 7
  5. 没有使用代理。以及官方的nuget.org/api/.在浏览器中工作。

注意:这发生在我重新安装操作系统时.有时候需要时间。有时它会冻结并挂在Restoring Nuget packages... message

,请问如何解决?

EN

Stack Overflow用户

回答已采纳

发布于 2022-08-01 03:22:49

根据您的描述,我认为问题在于您使用了PackageReference并使用nuget.exe来恢复包。

此链接中可以看出,对于迁移到PackageReference的项目,可以使用msbuild-t:restore来恢复包。

如果使用msbuild -t:restore,您可以尝试使用PackageReference而不是nuget restore ***.csproj来恢复包。有关更多详情,请参阅上述连结。

票数 1
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73187972

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档