Visual Studio 2010의 ReportViewer 10.0.0.0을 웹 응용 프로그램에 사용하고 있는데 어셈블리에 문제가 있습니다. 서버에 ReportViewer 8.0.0.0 및 9.0.0.0이 설치되어 있으며 버전 10.0.0.0 설치를 피하려고합니다.VS2010의 ReportViewer 어셈블리 관련 문제
ReportViewer10 dll이 서버에 설치되어 있지 않아도 가능하다고 생각했습니다. DLL의 Build Action
속성을 Content
으로 설정하여 출력 bin 폴더로 복사합니다. 속성 Copy to Output Directory
은 Do not copy
입니다.
다음 오류가 보여 주므로 프로젝트에서 GAC에있는 ReportViewer와 Temporary ASP.NET Files
에있는 두 개의 어셈블리를 찾습니다. 검색 중, 서버에 대한 각 요청이 Temporary ASP.NET Files
으로 다시 생성되었음을 발견했습니다.
내 문제를 해결하려고 시도한 결과 Temporary ASP.NET Files
에서 dll을 삭제했으며 응용 프로그램이 작동하지 않아 응용 프로그램이 GAC 또는 bin 폴더가 아닌 Temporary ASP.NET Files
의 dll을 사용하고 있음을 보여줍니다. bin 폴더의 dll 또는 Temporary ASP.NET Files
을 사용하도록 응용 프로그램을 설정하고 싶습니다. dll이 올바른 버전 (10.0.0.0)이기 때문입니다. 아래 오류는 GAC의 ReportViewer9 dll과 Temporary ASP.NET Files
의 ReportViewer10 DLL 간의 충돌을 보여줍니다.
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.
CS0433: The type 'Microsoft.Reporting.WebForms.ReportViewer' exists in both
'c:\\WINDOWS\assembly\GAC_MSIL\Microsoft.ReportViewer.WebForms\9.0.0.0__b03f5f7f11d50a3a\Microsoft.ReportViewer.WebForms.dll' and 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\project\4ec9147f\d072b522\assembly\dl3\662a86a1\009c93d3_afeccc01\Microsoft.ReportViewer.WebForms.DLL'
Line 180:
Line 181: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 182: private global::Microsoft.Reporting.WebForms.ReportViewer @__BuildControlReportViewer1() {
Line 183: global::Microsoft.Reporting.WebForms.ReportViewer @__ctrl;
Line 184:
Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\project\4ec9147f\d072b522\App_Web_default.aspx.cdcab7d2.dmkwuxko.0.cs
Line: 182