This is a migrated thread and some comments may be shown as answers.

Compilation Error

1 Answer 192 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 17 Sep 2018, 02:41 PM

I get the following error when trying to test an update to my website reports:

 

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

 

Compiler Error Message: CS0433: The type 'Telerik.ReportViewer.WebForms.ReportViewer' exists in both 'c:\Users\xxxxxx\AppData\Local\Temp\Temporary ASP.NET Files\root\1d706933\5e16d679\assembly\dl3\59214220\00d64b25_5a7dd001\Telerik.ReportViewer.WebForms.DLL' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Telerik.ReportViewer.WebForms\v4.0_9.1.15.624__a9d7983dfcc261be\Telerik.ReportViewer.WebForms.dll'

 

Source Error:

Line 410:       
Line 411:        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 412:        private global::Telerik.ReportViewer.WebForms.ReportViewer @__BuildControlrptViewer() {
Line 413:            global::Telerik.ReportViewer.WebForms.ReportViewer @__ctrl;
Line 414:

 

 

Source File: c:\Users\xxxxxxx\AppData\Local\Temp\Temporary ASP.NET Files\root\1d706933\5e16d679\App_Web_receivingappointmentdaily.aspx.cdcab7d2.gq-0gggm.0.cs    Line: 412 

 

 

It says that line 412 is the problem. I have tried removing the second file, the one in the AppData folder, but it comes back when I run the site in debug.

1 Answer, 1 is accepted

Sort by
0
Silviya
Telerik team
answered on 19 Sep 2018, 10:58 AM
Hello Michael,

As you've opened a support ticket on the same topic, I'll post my answer here to help the community in case of experiencing the same issue:

"This is a generic error and usually means that there is a mismatch in your referenced dll and the actual one used. Most likely you have not uninstalled previous reporting installations and have mismatched references. Please use the Upgrade Wizard to upgrade your projects containing Telerik reports and rebuild the project. If you have added manual references i.e. Copy Local = True, then delete all assemblies from bin folder, re-add proper references in the project and rebuild the project after that.

Form the provided project, I checked the versions of the dlls in /bin folder and there is a mismatch in Telerik.ReportViewer.WebForms assembly version. It refers to Q1 2015 9.0.15.422 which I assume is the version from witch you are upgrading. Check this screen shot for reference: https://www.screencast.com/t/irhPlaks.

Here is a list to check:
- Remove all references to Telerik Reporting 9.0.15.422 from your application.
- Remove assembly references to Telerik Reporting 9.0.15.422 from your web.config - check the <assemblies> section of your web.config file, and make sure that you are not referencing v. 9.0.15.422.
- Ensure that there are the new assembly references to Telerik Reporting in your web.config or that the needed assemblies are present in the bin folder of your web site."

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Silviya
Telerik team
Share this question
or