2

I have a web app which used ReportViewer, from which I am trying to delete ReportViewer and all its dependencies.

As far as I can see, I have deleted everything I need to and all works fine locally. However, when I deploy to our QA server and run the site, I get the following error:

System.IO.FileNotFoundException: 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.

I suspect that some other dll in the system depends on the ReportViewer.WebForms.dll, but I cannot work out which one. This dll is not referenced directly from anywhere in the app.

Does anyone know what dlls commonly reference ReportViewer.WebForms.dll?

Declan McNulty
  • 3,194
  • 6
  • 35
  • 54
  • Check the exception to see what line # it occurred at. My guess is that you need to check your web.config because it still may be referencing the ReportViewer control. – mason Dec 17 '13 at 14:48
  • 1
    I had already checked both those things - the exception is thrown at the point that Castle.Windsor.WindsorContainer.Register is called at Application_Start and there are no references to the ReportViewer control in my Web.Config. – Declan McNulty Dec 17 '13 at 15:02
  • Have you tried checking the machine.config file? See http://stackoverflow.com/q/2325473/1139830 – mason Dec 17 '13 at 15:10
  • Yes I have checked and it's not referenced in the machine.config – Declan McNulty Dec 17 '13 at 15:25
  • Can you re-publish your site without report viewer reference and Paste the published dll's and aspx pages into your QA Server.... – Magesh Dec 17 '13 at 15:44
  • @user1287675 There is no report viewer reference as it is being deployed now, one of the other dlls that I am referencing must depend on it as there is no reference to it in the entire application – Declan McNulty Dec 17 '13 at 15:57
  • @Declan Then you could try to disassemble all the referenced dll's and try to see which dll has referred to report viewer dll – Magesh Dec 17 '13 at 16:01
  • @Magesh I had already started the arduous process of using dot.peek to look at each dll's dependencies in turn, but the reason for the original question was that I was hoping somebody might know of some of the likely culprits to save me the time :) – Declan McNulty Dec 18 '13 at 15:37
  • I did same work as you are doing now that get rid of reportviewer but mine worked charm, after removed the reference i rebuild all the referenced dll and published to my UAT and Prod server Successfully.... you can try to see through object explorer for the Microsoft.Reportviewer.Webforms namespace hierarchy.. maybe anyone of dependency namespace still can referred to your application... – Magesh Dec 18 '13 at 15:48

1 Answers1

0

I think the dll's reside in GAC, causing this error. According to MSDN;

When you run ReportViewer.exe, the following files are installed in the Global Assembly Cache folder on the deployment computer.

Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.WinForms.dll
Microsoft.ReportViewer.DataVisualization.dll

Refer http://msdn.microsoft.com/en-us/library/ms251723.aspx for more clarification.

husnain_sys
  • 571
  • 4
  • 14