2013-02-13 230 views
9

之一,當我轉到我的網站,我得到這個錯誤...無法加載文件或程序集Microsoft.ReportViewer.WebForms或其依賴

Error 101 Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. C:\mlui\csharp\WebAdmin_solution\WebAdmin\web.config 209 

這是這行代碼:

<add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 

我正在使用Visual Studio 2012,是否需要下載並將其添加到VS 2012文件夾?

回答

2

試圖通過添加引用與10.0版最新組件更新到您的項目並添加組件文件將後重新構建它看起來像下面

Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 
6

如果您實際使用Reporting Services,嘗試在您將網站部署到服務器的服務器上安裝Reporting Services可再發行組件,或在您的Web應用程序中包含所需的程序集。

+0

你有一個鏈接,我可以下載它? – user1269625 2013-02-13 16:08:24

+0

我將如何將所需裝配包含到我的Web應用程序中? – user1269625 2013-02-13 16:10:01

+1

它應該在你的開發機器上,但是你可以試試這個:http://www.microsoft.com/en-us/download/details.aspx?id=3841 – 2013-02-13 16:11:10

3

看看你的文件夾安裝,哪個版本有文件夾ReportViewer。 並把版本= X.0.0.0其中X表示您的安裝版本。

在我的情況,我有

Instalation Folders

但只有10.0裏面有我中的ReportViewer

ReportViewer Folder

而我的web.xml是這樣

<assemblies> 
       <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
       <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
       <add assembly="Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
     </assemblies> 
    <buildProviders> 
       <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 
      </buildProviders> 
+0

謝謝你們..我有想法,也許沒有安裝reportviewer在該服務器..所以我下載一個單獨的安裝程序reportviewer vs2010 ..,它的工作原理! – 2015-08-06 04:57:41

相關問題