Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:57:22+00:00 2026-06-07T18:57:22+00:00

I am playing with my mvc project. I Nugeted a package called SocialAuth.Net into

  • 0

I am playing with my mvc project.

  1. I Nugeted a package called SocialAuth.Net into the project, which in turn uses Newtonsoft.Json.dll 4.0.0.0 (older) as one of its dependencies.

  2. Then because I also needed Json.Net myself, I wanted a newer version, So I Nugeted Json.NET, which has a newer version 4.5.0.0 (newer).

Then problem happens. In my razor view “ViewBag.Title = ….” it has red underline saying:

Warning 1 c:\users\admin\documents\visual studio
2010\Projects\WebApp\WebApp\Views\Home\Index.cshtml: ASP.NET runtime
error: Could not load file or assembly ‘Newtonsoft.Json,
Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or
one of its dependencies. The located assembly’s manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)

This is the Json part of my web.config:

  <dependentAssembly>
    <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
  </dependentAssembly>

So,

  1. I went to References, checked and found Newtonsoft.Json was 4.0.0.0 (probably came with SocialAuth.Net), and I deleted it, and added the 4.5.0.0 reference I got from Nuget.

  2. I went into WebApp/bin/debug/ folder and deleted everything, and then rebuilt the project.

However, once I rebuild the webapp, the Newton.Json 4.0.0.0 comes back into bin/debug/ regardless how I manually reference it to the new Nuget 4.5.0.0. and the same error comes back. I am stuck.

Do you have and idea how to deal with this dll issue? Thank you.

EDIT ———————————–

After a bit of thinking, I understand it is because first Json.Net (newer 4.5) is linked first, then the older one comes after it when building. So the older one overwrites the newer one.

I am not fimiliar with GAC installing, but know I could open that can of worms and install 2 versions there, which I don’t want to, because that means I have to do that to every machine I deploy the web app. Is there a way to play with the web.config and get around this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:57:25+00:00Added an answer on June 7, 2026 at 6:57 pm

    You could try to install the SocialAuth.Net package with the ‑IgnoreDependencies flag, then installing the dependencies manually and making sure that you only install the latest version of Json.Net library.

    Then at runtime the SocialAuth.Net package would respect the assembly redirect and load Json.Net (v4.5) instead of the old version.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm playing around with ASP.NET MVC and I just loaded up an empty project
Scenario I am playing MVC NerdDinner project and using ado.net entity data model instead
I'm playing with StringTemplate version 3.1.4.6002 as a view engine for an MVC project.
I am playing with learning ASP.NET MVC as a non-web developer. I am trying
i have just started playing aorund with asp.net mvc and i want to view
I'm playing around with some Dependency Injection ( StructureMap ) with my ASP.NET MVC
I'm diving head first into ASP MVC and am playing around with creating and
I am playing around with AJAX functionality using ASP.NET MVC. I have created a
I'm playing with an image gallery in ASP.NET MVC, and trying to get my
I am playing around with a new MVC 3 project with entity framwork 4.1.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.