I’ve tried to build a .NET project(with ABP framework), but I encountered the following error message. I’m not sure what the issue is or how to solve it.
I’m working with :
.NET SDK Version 8.0
Visual Studio Version 2022
The Error message:
Error MSB4018 The "ResolvePackageAssets" task failed unexpectedly.
NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:Program Files (x86)Microsoft Visual StudioSharedNuGetPackages'.
at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders)
at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable`1 packageFolders)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() App.IdentityServer C:Program Filesdotnetsdk8.0.204SdksMicrosoft.NET.SdktargetsMicrosoft.PackageDependencyResolution.targets 266```
I've checked the path 'C:Program Files (x86)Microsoft Visual StudioShared' and there's no "NuGetPackages" folder in it.
And I've tried cleaning and rebuilding the project.
But nothing works
New contributor
siham is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.