Click here to Skip to main content
15,885,278 members
Articles / Web Development / ASP.NET
Tip/Trick

ASP.NET Cannot Load a Reference Assembly

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
22 Nov 2021CPOL 8K   5   1
Short route to fix this issue
Visual Studio gets lost when updating packages, its project file and packages.config. In this tip, you will see an easy way to overcome this issue.

Introduction

Too often, I see when running my webapplication from Visual Studio a problem with loading assemblies. Mismatching numbers, etc. It is annoying.

Image 1

Using the Code

There is an easy way to overcome this issue.

Step 1: Open your web.config

In your web.config, you will find the <runtime> section. Select that section and remove it from your web.config:

Image 2

Step 2: Rebuild Your Solution

When you rebuild your solution, you will get a warning stating conflicts.

Image 3

Step 3: DoubleClick the Line that States Conflicts

You will get a question if you want it fixed and click the YES button. A new runtime section is made in your web.config.

Image 4

Step 4: Rebuild Your Solution and Run It

Have fun with your application.

Image 5

History

  • V0.1: Initial tip

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Netherlands Netherlands
I started in the eightees with Basic and QuickBasic. When the ninetees started dBase was my thing. Close to the millenium years I swapped to C++ and since 2003 it is only programming in c#.

There is one thing about me.
Not that kind of OO guy and definately not an ORM-fan. I know a database to well to give the importance of data out in the hands of a tool.

Comments and Discussions

 
QuestionThank you for sharing Pin
Alfredo Quimbayo23-Nov-21 7:55
professionalAlfredo Quimbayo23-Nov-21 7:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.