Error at start up of omnisharp: mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded
See original GitHub issueSystem: ubuntu 20.04
- Open Visual Studio Code v1.52.1
- Open my (very big) C# project
Omnisharp mentions me the following errors
Actually, one project of my solution uses these assemblies (microsoft.codeanalysis.*****
). But, something interesting: if I put appart the project that references assemblies that seem to be the source of the problem and open it alone in VSCode, I don’t get the problem.
Information: my solution is VERY big.
Starting OmniSharp server at 1/5/2021, 11:31:21 AM
Target: /home/stephane/Documents/Sources/PMS/src/FundProcess.Pms.sln
OmniSharp server started.
Path: /home/stephane/.vscode/extensions/ms-dotnettools.csharp-1.23.8/.omnisharp/1.37.5/run
PID: 9520
Can't find custom attr constructor image: /home/stephane/.nuget/packages/microsoft.codeanalysis.csharp.features/3.8.0/lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.Features.dll mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /home/stephane/.nuget/packages/microsoft.codeanalysis.csharp.workspaces/3.8.0/lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.Workspaces.dll mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /home/stephane/.nuget/packages/microsoft.codeanalysis.features/3.8.0/lib/netcoreapp3.1/Microsoft.CodeAnalysis.Features.dll mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /home/stephane/.nuget/packages/microsoft.codeanalysis.csharp.features/3.8.0/lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.Features.dll mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /home/stephane/.nuget/packages/microsoft.codeanalysis.csharp.workspaces/3.8.0/lib/netcoreapp3.1/Microsoft.CodeAnalysis.CSharp.Workspaces.dll mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Can't find custom attr constructor image: /home/stephane/.nuget/packages/microsoft.codeanalysis.features/3.8.0/lib/netcoreapp3.1/Microsoft.CodeAnalysis.Features.dll mtoken: 0x0a000006 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:7
Top Results From Across the Web
Cannot resolve dependency to assembly because it has not ...
dll mtoken: 0x0a000005 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, ...
Read more >Reason for "Cannot resolve dependency to assembly" error
This can happen if your xaml file statically references a view model class and that view model class has a dependency which may...
Read more >Can't get VS Code C# extension to work in my Archlinux system
Hi, I want to start with Unity development on my Archlinux machine, ... Editor.dll mtoken: 0x0a000007 due to: Could not find method '.ctor' ......
Read more >How can i solve this error? - MSDN - Microsoft
When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve ...
Read more >'Cannot resolve dependency to assembly 'PostSharp, Version ...
37.9, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Setting
omnisharp.enableMsBuildLoadProjectsOnDemand
totrue
solved the problem for me.I’m having the same issue. Omnisharp stops functioning more often. I noticed I am spending lots of time trying to get intellisense up and running again. Restarting omnisharp sometimes helps but not always.