'Microsoft.Reporting.WebForms.ReportViewer' does not contain a definition for 'Reset'解决方法

本解决方案转自:http://social.msdn.microsoft.com/forums/en/vsreportcontrols/thread/8b2e4694-4a01-460e-8a32-1978ce3d62a0/
另一篇关于此问题的解决方法:http://forums.asp.net/t/1149139.aspx
因人而异,大家可根据自己的情况用相应的解决方法。
Okay, I'm going to do my best to re-trace my steps, give credit where credit is due, and provide the solution.

First, I discovered on this blog page that the Reset() function is new to Visual Studio 2005 SP1. (But I guess you knew that Dave)

Then, I compared the DLL version of Microsoft.ReportViewer.WebForms.dll in C:\Windows\assemblies to my production machine, and found that I have version 8.0.50727.762 while my prod machine has version 8.0.50727.42. Ahah!

Then, I found this MSDN forum post, from a user with other troubles related to the fact that the redistributable ReportViewer package does not yet have the updated version that Visual Studio 2005 SP1 has.  So, the DLLs need to be manually copied/imported over to your production machine, until a new package gets released.

Here are the steps I used:

  1. Copy DLLs to prod machine
    1. Found these in C:\Program Files\Microsoft Visual Studio 8\ReportViewer
      1. Microsoft.ReportViewer.Common.dll, Microsoft.ReportViewer.WebForms.dll, Microsoft.ReportViewer.WinForms.dll
    2. Found this in C:\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\8.0.0.0__b03f5f7f11d50a3a\
      1. Microsoft.ReportViewer.ProcessingObjectModel.dll
  2. Copy gacutil to prod machine
    1. Found gacutil.exe and gacutil.exe.config in C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
  3. Install each DLL using gacutil /if [path to dll]
    1. Example: gacutil /if C:\tempdir\Microsoft.ReportViewer.Common.dll
  4. Restart IIS.  Done!

I hope this serves to save you and anyone else who stumbles across this post the hours of frustration I suffered.  What a relief.  Now back to more productive things.

 I appreciate the comments from BobMcLaren above - very clear!

  Unfortunately, his solution didn't work for me.  Perhaps it was because I do not have C:\Windows\assembly\GAC_MSIL directory.

  For me, the best solution is found by downloading the current upgrade of the Microsoft Report Viewer Redistributable 2005 SP1 which was released on Mar. 27, 2007.  Once installed on the production server, all the problems went away.

 

--Christopher

 

你可能感兴趣的:(Microsoft)