英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论