title: How to get .RDLC files from dll and put them to reportviewer control?
body: <p>I have 2 projects as follow:</p>
  
  <p>First: All reports(rdlc files) are here.</p>
  
  <p><img src="https://i.stack.imgur.com/anqVW.png" alt="Class Library"></p>
  
  <p>Second: <strong>SharePoint 2010</strong> solution that shows my reports. </p>
  
  <p><img src="https://i.stack.imgur.com/oHz8K.png" alt="SharePoint 2010 Project"></p>
  
  <p>I use following code to access <strong>RDLC</strong> file in dll and put it in <code>reportviewer</code> control in <strong>SharePoint Application Page</strong> in second project:</p>
  
  <pre><code>Assembly assembly = Assembly.LoadFrom("ReportsLib.dll");
  Stream stream = assembly.GetManifestResourceStream("ReportsLib.MyReport.rdlc");
  reportViewer.LocalReport.LoadReportDefinition(stream);
  </code></pre>
  
  <p>When i want to get <strong>rdlc</strong> file from <code>ReportsLib</code> (for example: MyReport.rdlc) and put it in reportviewer control in SharePoint Application Pages, following error occurred:</p>
  
  <pre><code>[FileNotFoundException: Could not load file or assembly 'file:///c:\windows\system32\inetsrv\ReportsLib.dll' or one of its dependencies. The system cannot find the file specified.]
     System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark&amp; stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
     System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean forIntrospection) +416
     System.Reflection.Assembly.LoadFrom(String assemblyFile) +52
     HRS.ReportsViewer.Layouts.ShowReport.Page_Load(Object sender, EventArgs e) +77
     System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
     System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
     System.Web.UI.Control.OnLoad(EventArgs e) +132
     Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.OnLoad(EventArgs e) +101
     Microsoft.SharePoint.WebControls.LayoutsPageBase.OnLoad(EventArgs e) +49
     System.Web.UI.Control.LoadRecursive() +66
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428
  </code></pre>
  
  <p>What do i do wrong?</p>