question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y 'Microsoft.Extensions.Primitives

See original GitHub issue

Hi Guys, I running project with command line “dotnet run” it’s throw error and I don’t know why please let’s me know how to resolve this problem, thanks

Full ERROR

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y ‘Microsoft.Extensions.Primitives, Version=1.1.0.0, Culture=neutral, PublicKeyT oken=adb9793829ddae60’ or one of its dependencies. The located assembly’s manife st definition does not match the assembly reference. (Exception from HRESULT: 0x 80131040) —> System.IO.FileLoadException: Could not load file or assembly ‘Microsoft.Extensions.Primitives, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a db9793829ddae60’ or one of its dependencies. The located assembly’s manifest def inition does not match the assembly reference. (Exception from HRESULT: 0x801310 40) — End of inner exception stack trace — at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at Microsoft.AspNetCore.Hosting.WebHostBuilder…ctor() at WBS.BackEnd.Program.Main(String[] args) in D:\1.Coding\StartUp\WBS\3. Sour ce Code\WBS.Solution\src\WBS.BackEnd\Program.cs:line 10

Environment data

dotnet --info output: Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e

Runtime Environment: OS Name: Windows OS Version: 6.2.9200 OS Platform: Windows RID: win8-x64

Project.json

“dependencies”: { “Microsoft.AspNetCore.Diagnostics”: “1.0.0-rc2-final”, “Microsoft.AspNetCore.Mvc”: “1.0.0-rc2-final”, “Microsoft.AspNetCore.Razor.Tools”: { “version”: “1.0.0-preview1-final”, “type”: “build” }, “Microsoft.AspNetCore.Server.IISIntegration”: “1.0.0-rc2-final”, “Microsoft.AspNetCore.Server.Kestrel”: “1.0.0-rc2-final”, “Microsoft.AspNetCore.StaticFiles”: “1.0.0-rc2-final”, “Microsoft.Extensions.Configuration.EnvironmentVariables”: “1.0.0-rc2-final”, “Microsoft.Extensions.Configuration.Json”: “1.0.0-rc2-final”, “Microsoft.Extensions.Logging”: “1.0.0-rc2-final”, “Microsoft.Extensions.Logging.Console”: “1.0.0-rc2-final”, “Microsoft.Extensions.Logging.Debug”: “1.0.0-rc2-final”, “Microsoft.VisualStudio.Web.BrowserLink.Loader”: “14.0.0-rc2-final”, “MongoDB.Driver”: “2.2.4”, “AngularJS.Animate”: “1.5.5”, “WBS.Common”: “1.0.0-", “WBS.Entities”: "1.0.0-”, “WBS.Service”: “1.0.0-*”, “Microsoft.Extensions.Options.ConfigurationExtensions”: “1.0.0-rc2-final”, “Microsoft.Extensions.DependencyInjection”: “1.0.0-rc2-final”, “System.IdentityModel.Tokens”: “5.0.0-rc1-211161024”, “System.IdentityModel.Tokens.Jwt”: “5.0.0-rc2-305061149”, “Microsoft.Framework.DependencyInjection.Abstractions”: “1.0.0-beta8”, “Microsoft.AspNetCore.Authentication.JwtBearer”: “1.0.0-rc2-final”, “Microsoft.AspNetCore.Cors”: “1.0.0-rc2-final”, “Microsoft.Owin.Security.Jwt”: “3.0.1”, “Microsoft.AspNetCore.Authentication.Cookies”: “1.0.0-rc2-final” },

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
jindovucommented, Jul 22, 2016

Hi svick I deleted folder bin, obj and restart my computer, it’s working ok now, I don’t know why occur problem Thank you for your help

1reaction
prashitcommented, Dec 28, 2016

@shahabganji , this helped. Problem was specifically with version of “Microsoft.AspNetCore.Routing” but good to update all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Could not load file or assembly Microsoft.Extensions. ...
I was having this problem. But the packet was Microsoft.Extensions.Primitives. In my case I installed it in my Project and in my Project...
Read more >
Unhandled Exception: System.IO.FileLoadException ...
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y 'Microsoft.Extensions.Primitives #6668.
Read more >
Upgrade my Azure Function from .net Core 3.1 to . ...
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.Configuration.Abstractions, Version=7.0.0.0, ...
Read more >
Could not load file or assembly 'Microsoft.Extensions. ...
When instatlling Sitecore Headless Rendering package it included set of files like config , Dlls , module items , and view .
Read more >
Could not load file or assembly 'Microsoft.Extensions. ...
Hello, I am on v3.x assemblies and trying to load swagger.json. However I am getting Could not load file or assembly 'Microsoft.Extensions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found