C# .NET - The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both.

Asked By Pranay on 04-Apr-11 01:01 PM
I am getting this error with Report Viewer:
The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\10.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'c:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' D:\sst1000\Invoiceology\App_Code\InvoiceWebService.cs 52 9 D:\sst1000\Invoiceology\
........
Now, I have already changed version from 9.0.0.0 to 10.0.0.0 in webconfig and in the register Tag of all aspx files but I dont know what to do with my webservices .........because they dont have these tags in designer page......and I am also wondering if the changes I made were right thing to do.
Thanks for your help and support,
Pranay
Vic S replied to Pranay on 04-Apr-11 01:59 PM
If you are certain you are not referencing the older version anywhere in your app,
did you try clearing your temp folder?
When your app runs, it will copy the \bin files into c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727(or whatever version you are using)\Temporary ASP.NET Files\xxxx folder as needed. Try clearing the old reference or just clearing the folder.
Pranay replied to Vic S on 05-Apr-11 12:09 PM
Thanks for your help Vic....
I got the thing working after I added this peice of code to my webconfig file........

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="Microsoft.ReportViewer.WebForms"

publicKeyToken="b03f5f7f11d50a3a" />

<bindingRedirect oldVersion="9.0.0.0"

newVersion="10.0.0.0"/>

</dependentAssembly>

</assemblyBinding>

</runtime>

 

</configuration>


Regards,
Pranay