4

I have a VS 2010 WPF application which uses ReportViewer (RDLC) which I am trying to build in VS 2013. I am having a problem with the build. In 2010 (.NET 4) it worked fine with Microsoft.ReportViewer.WinForms.

To build under 2013, I found two NuGet packages: Micosoft.ReportViewer.WebForms v 11.0.0.0 (note spelling error!) and: ReportViewer.Common 10.0

Using the first one, an error message tells me: error CS0012: The type 'System.Web.UI.IScriptControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

I can't seem to find this exact assembly; using any other version, I get: error MC1000: Unknown build error, 'Binary format of the specified custom attribute was invalid.'

I've tried with my application targeting .NET 4.0 and also tried targeting 4.5.1; nothing seems to work.

How can I build a WPF application using VS 2013, targeting at least .NET 4.0 (although I'd prefer newer), and using RDLC?

What components do I need to install? What NuGet packages should I use? What assemblies (versions) should I reference, and where do I find them?

Zenilogix
  • 1,318
  • 1
  • 15
  • 31

1 Answers1

3

You need the ReportViewer WinForms assembly, not WebForms which is for web applications. I know your app is WPF but you need to use the WinForms viewer.

Greg Ennis
  • 14,917
  • 2
  • 69
  • 74
  • Thanks, but where does one find the appropriate one for use in VS 2013? Is it in NuGet? Is there a download link (haven't found one so far)? – Zenilogix Dec 31 '13 at 19:54
  • 1
    Found REPORT VIEWER 2012 RUNTIME here: http://www.microsoft.com/en-ca/download/confirmation.aspx?id=35747 ...installed, and added the reference via file browse (not a listed component). Is this as expected? – Zenilogix Dec 31 '13 at 21:17
  • It would not be listed in the components unless you installed the assemblies in the GAC. So yes you should just use the browse feature and store those assemblies in your source control. Make sure copy local is set to true for those assemblies. – Greg Ennis Dec 31 '13 at 21:28