Cosmos icon indicating copy to clipboard operation
Cosmos copied to clipboard

System.IO.FileLoaderException: Could not load file or assembly Cosmos.Debug.Kernel

Open rosebytee opened this issue 3 years ago • 39 comments

image

Please help.

rosebytee avatar Feb 11 '22 18:02 rosebytee

Are you using devkit/userkit?

quajak avatar Feb 12 '22 13:02 quajak

Latest userkit.

rosebytee avatar Feb 13 '22 08:02 rosebytee

Hello @realrandombeans, could you try this userkit build? https://anonfiles.com/hfgbd4Idx4/CosmosUserKit-20220214-vs2019_exe

valentinbreiz avatar Feb 14 '22 23:02 valentinbreiz

I had the same problem and tried downloading that user kit and I am still having the same problem.

androbytes avatar Mar 31 '22 09:03 androbytes

Clear the nuget cache and try again.

quajak avatar Apr 06 '22 13:04 quajak

already tried that

androbytes avatar Apr 06 '22 19:04 androbytes

Are the nuget packages installed from the devkit or from the userkit?

quajak avatar Apr 07 '22 18:04 quajak

user

androbytes avatar Apr 07 '22 20:04 androbytes

Can you post the entire build log?

quajak avatar Apr 08 '22 14:04 quajak

image

androbytes avatar Apr 08 '22 18:04 androbytes

Can you post your csproj file?

quajak avatar Apr 10 '22 08:04 quajak

https://www.file.io/BP57/download/uICvMrA2DRx9

androbytes avatar Apr 10 '22 13:04 androbytes

Thanks, can you show which versions of the nuget packages you have installed?

quajak avatar Apr 10 '22 18:04 quajak

how?

androbytes avatar Apr 10 '22 19:04 androbytes

it's V3

androbytes avatar Apr 10 '22 19:04 androbytes

In the nuget package manager it should show you which version is installed for each package.

quajak avatar Apr 11 '22 09:04 quajak

i has same problem while i trying clean nuget cache popups error i reinstalled cosmos seveal times, but it won't work

Hello @realrandombeans, could you try this userkit build? https://anonfiles.com/hfgbd4Idx4/CosmosUserKit-20220214-vs2019_exe

this are not work too

logs (my system lang is russian, sorry for non-english words):

Сборка начата…
1>------ Сборка начата: проект: test, Конфигурация: Debug Any CPU ------
1>test -> C:\VSrepos\test\test\bin\Debug\net5.0\test.dll
1>Error : error occurred: System.IO.FileLoadException: Could not load file or assembly 'Cosmos.Debug.Kernel, Version=10.0.0.0, Culture=neutral, PublicKeyToken=5ae71220097cb983'.
1>   at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)
1>   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
1>   at Cosmos.IL2CPU.IsolatedAssemblyLoadContext..ctor(IEnumerable`1 assemblyPaths) in C:\Development\Cosmos\IL2CPU\source\Cosmos.IL2CPU\IsolatedAssemblyLoadContext.cs:line 43
1>   at Cosmos.IL2CPU.CompilerEngine..ctor(ICompilerEngineSettings aSettings) in C:\Development\Cosmos\IL2CPU\source\Cosmos.IL2CPU\CompilerEngine.cs:line 96
1>   at Cosmos.IL2CPU.Program.RunCompilerEngine(String[] aArgs, Action`1 aLogMessage, Action`1 aLogError) in C:\Development\Cosmos\IL2CPU\source\Cosmos.IL2CPU\Program.cs:line 64
1>   at Cosmos.IL2CPU.Program.Run(String[] aArgs, Action`1 aLogMessage, Action`1 aLogError) in C:\Development\Cosmos\IL2CPU\source\Cosmos.IL2CPU\Program.cs:line 47
1>IL2CPU task took 00:00:00.1355167
1>Сборка проекта "test.csproj" завершена с ошибкой.
========== Сборка: успешно: 0, с ошибками: 1, без изменений: 0, пропущено: 0 ========== 

ghost avatar Apr 15 '22 01:04 ghost

maybe just reinstall user kit ..?

RockZombie4 avatar May 31 '22 20:05 RockZombie4

already been tried 4 times

androbytes avatar Jun 01 '22 10:06 androbytes

The issue is that the local nuget cache on the machine still contains old versions which have a higher version number than the new correct packages. To fix this please clear the local nuget cache and then check which nuget package versions are installed for the cosmos packages.

quajak avatar Jun 01 '22 10:06 quajak

I cleared all local caches (including cosmos) and re-installed cosmos, still the same error

androbytes avatar Jun 01 '22 11:06 androbytes

In the nuget package manager in visual studio can you show the list of all available versions for the cosmos nuget packages?

quajak avatar Jun 01 '22 15:06 quajak

Did you mess around with any of the COSMOS configuration or settings?

RockZombie4 avatar Jun 01 '22 20:06 RockZombie4

No, just installed it and it doesn't work. It worked before on my old laptop using windows 10. I am using windows 11. Could this be the problem?

androbytes avatar Jun 02 '22 10:06 androbytes

Cosmos should be working fine in win11

quajak avatar Jun 02 '22 17:06 quajak

That isn't really fixing my problem

androbytes avatar Jun 02 '22 17:06 androbytes

In the nuget package manager in visual studio can you show the list of all available versions for the cosmos nuget packages?

Can you please post this information? Otherwise we can triage and fix this issue.

quajak avatar Jun 02 '22 17:06 quajak

image

androbytes avatar Jun 02 '22 18:06 androbytes

I think those versions are still from February. There should be newer ones available.

quajak avatar Jun 02 '22 21:06 quajak

I just reinstalled cosmos yesterday though

androbytes avatar Jun 03 '22 10:06 androbytes