could not load file or assembly

could not load file or assembly

   Error itself is self explanatory. you forgot to add required assembly references into your project.

1. Right click on project then add reference (add reference dialoge box will popup).
2. Search assembly from .net tab and add a reference.
3. If you are using project refernce select project reference and add reference of required assembly.
4. Also, you can find the assembly by browsing options.

Many tims assembly doesn't exists in computer, in that case you need to search it on web find the installables like
AjaxControlToolkit or AjaxExtensions or for RIA etc... etc.. .

If you don;t have those assemblies on production server follow below steps.


1. Right click on reference assembly.
2. look at its property.
3. set copy local to true.

This will copy the assembly from GAC to your local bin folder and when you go live with your production server,
 your application will start refering that assembly from bin folder instead of GAC folder of production server.

Also, you can copy the assemblies from local GAC folder to bin folder of your application
by refering

All errors speaks loudely "I'm error".
If you understand what they are saying you don't need to search around, you can fix any error independently.

Tags: File Uploadcould not load file or File delete file file on Server and codeC# Delete All Files In DirectoryC#- how to download file ( net image uploadC# Get File SizeC# File ExistsC# Read File Line By LineASP.NET resources in separate assembly


My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.

I'm Satalaj.