I'm trying to set up a build machine and have managed to get everything up and running. This is the last bit I'm stuck on. I tried to un/reinstall ReportViewer 10, and also tried to install versions 8 and 9 to see if it would resolve the problem but with no success. Anyway here's the error:
c:\\Program Files\\Microsoft Visual Studio 9.0\\ReportViewer\\Microsoft.ReportViewer.WinForms.dll: error CS1684: Warning as Error: Reference to type Microsoft.ReportingServices.ReportProcessing.RenderingResult' claims it is defined in 'c:\\ Program Files\\Microsoft Visual Studio 10.0\\ReportViewer\\Microsoft.ReportViewer. Common.dll', but it could not be found
And similarly,
c:\\Program Files\\Microsoft Visual Studio 9.0\\ReportViewer\\Microsoft.ReportViewer.WinForms.dll: error CS1684: Warning as Error: Reference to type 'Microsoft.SqlServer.ReportingServices2005.Execution.Warning' claims it is defined in 'c:\\Program Files\\Microsoft Visual Studio 10.0\\ReportViewer\\Microsoft.ReportViewer.Common.dll', but it could not be found
Has anyone seen this before?
In Microsoft.ReportViewer.WinForms.dll
there is a class definition which uses Microsoft.ReportingServices.ReportProcessing.RenderingResult
as base class;
public class foo : Microsoft.ReportingServices.ReportProcessing.RenderingResult
{
}
You use this foo
class somewhere in your code. The class RenderingResult
is defined in Microsoft.ReportViewer.Common.dll
. This class requires the same version of RenderingResult
to be referenced. Because you use the 9.0 version of Microsoft.ReportViewer.WinForms.dll and the 10.0 version of Microsoft.ReportViewer.Common.dll they do not match. The RenderingResult
is different in the 10.0 version, so the foo
class definition is incomplete.
To resolve this, you need to make sure you use the matching assemblies, for example you might need to manually adjust the HintPath
in the .csproj file to fix this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.