无法找到备用包文件夹

huangapple go评论66阅读模式
英文:

Unable to find fallback package folder

问题

当我运行 ASP.NET 项目时,出现以下错误。

C:\Program Files\dotnet\sdk\7.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): error MSB4018: NuGet.Packaging.Core.PackagingException: 无法找到备用包文件夹 'C:\Program Files (x86)\Microsoft\Xamarin\NuGet'。

英文:

When I run the ASP.NET project, got the following error.

> C:\Program Files\dotnet\sdk\7.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5): error MSB4018: NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Program Files (x86)\Microsoft\Xamarin\NuGet'.

答案1

得分: 1

尝试在所请求的位置创建一个文件夹,即 C:\Program Files (x86)\Microsoft\Xamarin\NuGet。例如,我在这里添加了一个空文件夹:C:\Users\USERNAME\NuGetRepository,并遇到了一个非常类似的错误。

我不知道为什么这会起作用(但目前还不清楚),但我不再收到错误消息:尝试构建同事提供给我的一个简单的C# .Net 7项目时,出现了 "The "ResolvePackageAssets" task failed unexpectedly Unable to find fallback package folder C:\Users\USERNAME\NuGetRepository" 的错误消息(其中"USERNAME"是我的Windows用户名)。

英文:

Try creating a folder at the location it is asking for, i.e., 'C:\Program Files (x86)\Microsoft\Xamarin\NuGet'. For example, I added a blank folder here: C:\Users\USERNAME\NuGetRepository and got passed an error very similar to this.

I have no idea why this works (yet) but I no longer get the error message: The "ResolvePackageAssets" task failed unexpectedly Unable to find fallback package folder C:\Users\USERNAME\NuGetRepository (where username is my Windows username) when trying to Build a simple C# .Net 7 project that a colleague gave me.

huangapple
  • 本文由 发表于 2023年2月6日 12:43:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/75357403.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定