C
C#5mo ago
Archion

What the hell is this error?

I tried to use "dotnet run" as always on my vscode terminal and then this error just jumped randomly. I use .Net6.0.412 Microsoft.PackageDependencyResolution.targets(267,5): error MSB4018
28 Replies
Archion
ArchionOP5mo ago
How to solve this¿
Pobiega
Pobiega5mo ago
are there no further error messages? MSB4018 just means "Task failed unexpectedly" there is usually way more errors after
Archion
ArchionOP5mo ago
Wait a minute i am trying to send the error But its long and discord doesnt like it C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:The"ResolvePackageAssets"taskfailedunexpectedly.[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:NuGet.Packaging.Core.PackagingException:Unabletofindfallbackpackagefolder'C:\Users\user\AppData\Roaming\Godot\mono\GodotNuGetFallbackFolder'.[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atNuGet.Packaging.FallbackPackagePathResolver..ctor(StringuserPackageFolder,IEnumerable1fallbackPackageFolders)[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(IEnumerable1packageFolders)[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFilelockFile)[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssetstask)[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssetstask,Byte[]settingsHash)[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssetstask)[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.NET.Build.Tasks.TaskBase.Execute()[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()[C:\Users\user\Desktop\thecargame\thecargame.csproj] C:\ProgramFiles\dotnet\sdk\6.0.412\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(267,5):errorMSB4018:atMicrosoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHosttaskExecutionHost,TaskLoggingContexttaskLoggingContext,TaskHosttaskHost,ItemBucketbucket,TaskExecutionModehowToExecuteTask)[C:\Users\user\Desktop\thecargame\thecargame.csproj] its really long and idk why this happened
Archion
ArchionOP5mo ago
This didn't help me bro
המשורר
המשורר5mo ago
did you include project dependencies?
Archion
ArchionOP5mo ago
I did sir
המשורר
המשורר5mo ago
This can manifest as a System.DllNotFoundException.
Archion
ArchionOP5mo ago
Because a week ago it worked Thats why its weird
Pobiega
Pobiega5mo ago
Pretty sure this is it NuGet.Packaging.Core.PackagingException:Unabletofindfallbackpackagefolder'C:\Users\user\AppData\Roaming\Godot\mono\GodotNuGetFallbackFolder'
Archion
ArchionOP5mo ago
But godot is deleted wtf 😭
Pobiega
Pobiega5mo ago
so this isnt a godot project?
Archion
ArchionOP5mo ago
No
Pobiega
Pobiega5mo ago
ok
Archion
ArchionOP5mo ago
Its a raylib project
Pobiega
Pobiega5mo ago
lets look at your nuget sources are you using visual studio? or just vscode
Archion
ArchionOP5mo ago
Vscodium
Pobiega
Pobiega5mo ago
ok is there a nuget.config file in your project directory?
Archion
ArchionOP5mo ago
Nope
Pobiega
Pobiega5mo ago
alright, then we open up %appdata%\NuGet there should be a nuget config file there
Archion
ArchionOP5mo ago
Its there
Pobiega
Pobiega5mo ago
open it up and show me the content
Bailey
Bailey5mo ago
Maube do a: dotnet restore
Archion
ArchionOP5mo ago
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="Package source" value="C:\Users\user\Desktop" /> <add key="Microsoft Visual Studio Offline Packages" value="C:\Program Files (x86)\Microsoft SDKs\NuGetPackages" /> </packageSources> <packageRestore> <add key="enabled" value="True" /> <add key="automatic" value="True" /> </packageRestore> <bindingRedirects> <add key="skip" value="False" /> </bindingRedirects> <packageManagement> <add key="format" value="0" /> <add key="disabled" value="False" /> </packageManagement> <disabledPackageSources> <add key="Microsoft Visual Studio Offline Packages" value="true" /> <add key="nuget.org" value="true" /> </disabledPackageSources> </configuration>
Pobiega
Pobiega5mo ago
replace all of it with
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
you dont need anything else but this specifically <add key="Package source" value="C:\Users\user\Desktop" /> makes me very worried
Archion
ArchionOP5mo ago
Same error WAIT I deleted a file called godot.nuget.config Dude
Pobiega
Pobiega5mo ago
yes good
Archion
ArchionOP5mo ago
Thank you guys I am learning c# for 2-3 years but i am still a beginner lool
Want results from more Discord servers?
Add your server