Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.
Scenarios:
-If you get the following errors:
Could not load file or assembly Microsoft.ReportViewer.Common Could not load file or assembly Microsoft.ReportViewer. ProcessingObjectModel
Server Error in '/' Application.
Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
You can follow the following steps to copy it from GAC (Global Assembly cache):
COPY Microsoft.ReportViewer.ProcessingObjectModel
1. Open a command prompt (select Start/Run and then enter "cmd" and press enter).
2. Type the following command and press enter:
cd C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel
2 (i) Type 'dir' and press 'enter'. You would be able to see the following folder:
It depends on which version you have on your system. It can be either 8.0.0.0 OR 9.0.0.0.
8.0.0.0__b03f5f7f11d50a3a OR 9.0.0.0__b03f5f7f11d50a3a
2(ii). Type "cd 8.0.0.0__b03f5f7f11d50a3a" if you have 8.0.0.0 version OR
"cd 9.0.0.0__b03f5f7f11d50a3a" if you have 9.0.0.0 and press 'enter'.
2(iii). You should be able to see the following DLL in this folder:
Microsoft.ReportViewer.ProcessingObjectModel.dll
2(iv). Now use the following command to copy the dll file to your bin directory:
copy *.dll d:\YourProject\bin
3. COPY Microsoft.ReportViewer.Common
cd C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common
3 (i) Type 'dir' and press 'enter'. You would be able to see the following folder:
It depends on which version you have on your system. It can be either 8.0.0.0 OR 9.0.0.0.
8.0.0.0__b03f5f7f11d50a3a OR 9.0.0.0__b03f5f7f11d50a3a
3(ii). Type "cd 8.0.0.0__b03f5f7f11d50a3a" if you have 8.0.0.0 version in step 3 OR
"cd 9.0.0.0__b03f5f7f11d50a3a" if you have 9.0.0.0 and press 'enter'.
3(iii). You should be able to see the following DLL in this folder:
Microsoft.ReportViewer.Common.dll
3(iv). Now use the following command to copy the dll file to your bin directory:
copy *.dll d:\YourProject\bin
Could not load file or assembly Microsoft.ReportViewer.Common Could not load file or assembly Microsoft.ReportViewer. ProcessingObjectModel
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.Parser Error Message: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
You can follow the following steps to copy it from GAC (Global Assembly cache):
COPY Microsoft.ReportViewer.ProcessingObjectModel
1. Open a command prompt (select Start/Run and then enter "cmd" and press enter).
2. Type the following command and press enter:
cd C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel
2 (i) Type 'dir' and press 'enter'. You would be able to see the following folder:
It depends on which version you have on your system. It can be either 8.0.0.0 OR 9.0.0.0.
8.0.0.0__b03f5f7f11d50a3a OR 9.0.0.0__b03f5f7f11d50a3a
2(ii). Type "cd 8.0.0.0__b03f5f7f11d50a3a" if you have 8.0.0.0 version OR
"cd 9.0.0.0__b03f5f7f11d50a3a" if you have 9.0.0.0 and press 'enter'.
2(iii). You should be able to see the following DLL in this folder:
Microsoft.ReportViewer.ProcessingObjectModel.dll
2(iv). Now use the following command to copy the dll file to your bin directory:
copy *.dll d:\YourProject\bin
3. COPY Microsoft.ReportViewer.Common
cd C:\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.Common
3 (i) Type 'dir' and press 'enter'. You would be able to see the following folder:
It depends on which version you have on your system. It can be either 8.0.0.0 OR 9.0.0.0.
8.0.0.0__b03f5f7f11d50a3a OR 9.0.0.0__b03f5f7f11d50a3a
3(ii). Type "cd 8.0.0.0__b03f5f7f11d50a3a" if you have 8.0.0.0 version in step 3 OR
"cd 9.0.0.0__b03f5f7f11d50a3a" if you have 9.0.0.0 and press 'enter'.
3(iii). You should be able to see the following DLL in this folder:
Microsoft.ReportViewer.Common.dll
3(iv). Now use the following command to copy the dll file to your bin directory:
copy *.dll d:\YourProject\bin
Thank you so much!
ReplyDeletevery welcome :)
DeleteThis post helped me solve an issue!
ReplyDeleteyou are welcome
DeleteDear "Mahmoud Salem Mahmoud",
ReplyDeleteThank you so much. After spending 1 hell hour somehow luckily landed at this blog of urs which solved my problem within 5 minutes.. god bless you.
My pleasure
DeleteMahmoud.. Thank you very much, your post helped ...
ReplyDeletewelcome
DeleteThanks
ReplyDeletewelcome dear :)
DeleteThank you very much.
ReplyDeletegood job...Thank you
ReplyDeleteThanks brother
ReplyDeleteWhat is d:\YourProject\bin? since I dont have a D: drive.
ReplyDeleteBy YourProject is the installation path under Program Files?
bin folder inside your "ASP.NET" Project
DeleteYourProject is the website folder sometime it under wwwroot folder inside iis
Thanks BUT , Please Share This also !, Your solution is FIRST STEP ,
ReplyDeleteSECOND STEP is , ( FROM GODADDY.COM )
The default trust level on your account depends on the version of ASP.NET you are currently using (more info).
ASP.NET 1.1
If you are using ASP.NET 1.1 on your Windows shared hosting account, you have 'full trust' on the server.
ASP.NET 2.0/3.0/3.5
If you're using .NET runtime environment 2.0, you have 'medium trust' on the server.
ASP.NET 4.0/4.5
If you're using .NET runtime environment 4.0, you have 'web full trust' on the server.
NOTE: When using ASP.NET 4.0/4.5 you must declare Full Trust in your Web.Config. You can add the following snippet of code to your Web.Config:
Thank you very much. Perfect solution...:)
ReplyDeleteyou're my hero
ReplyDeleteThank You!
ReplyDeleteThanks dude.
ReplyDeleteIt was a perfect solution.
Thanks a lot.
ReplyDeleteI included the following dll files and now my reports are working fine on the server. :)
• Microsoft.ReportViewer.Common.dll
• Microsoft.ReportViewer.DataVisualization.dll
• Microsoft.ReportViewer.ProcessingObjectModel.dll
• Microsoft.ReportViewer.WebForms.dll
• Microsoft.SqlServer.Types.dll
Where I can get following • Microsoft.ReportViewer.Common.dll
Delete• Microsoft.ReportViewer.DataVisualization.dll
• Microsoft.ReportViewer.ProcessingObjectModel.dll
• Microsoft.ReportViewer.WebForms.dll
• Microsoft.SqlServer.Types.dll
you can get all DLL from GAC
Deletefollow the below link http://stackoverflow.com/questions/714907/how-to-extract-an-assembly-from-the-gac
- open Run "windows key + R"
- type “%windir%\assembly\GAC_MSIL”
all build in Dll saved there
Even in c:\\windows\assembly folder
ReplyDeleteiam nt having report viewer dlls, hw can i proceed further. Please help me out.
Thanks ! in advance
Thank you.. it worked perfectly. :)
ReplyDeleteReally Thanks
ReplyDeleteawesome. worked like a charm.
ReplyDeleteby the way can we copy that manually also right?