Error while previewing SSRS Reports in VS2017 with Custom Assemblies
Asked Answered
P

2

5

We're trying to migrate our old Reporting Services solution from Visual Studio 2008 with Business Intelligenge Studio, to Visual Studio 2017 with SQL Server Data Tools. The reports in the project are referencing a custom assembly for localization of the reports. And that custom assembly project is part of the solution.

As with VS2008, for the reports project to be able to be built, the custom assembly needs to be built and placed in the Private Assemblies folder for VS, no worries there.

But when I try to preview the reports in VS, it still gives this error

Error while loding code modue: MyCompany.MyDllName, Version=1.2.3.4. Details: Could not load file or assembly MyCompany.MyDllName, Version=1.2.3.4, or one of it's depencies. The system cannot find the file specified.

I have checked that the file does exist in the Private Assemblies folder, and that the version number matches the one referenced in the reports.

Where do I need to place the file for the preview view to be able to find it? And how can it be different from where I need to place them for the reports to build?

Psychophysiology answered 19/5, 2017 at 9:11 Comment(1)
Managed to find the right folder for the files now. Exact paths are of course depending on where you installed VS2017. I used default installation folders and got these paths. For building the Reports project to work: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PrivateAssemblies For previewing the Reports to work: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSDTRSPsychophysiology
M
6

After struggling with a similar issue (but not for custom assemblies) for days, this post helped solve the problem. In my case I was getting the error

Could not load file or assembly 'Microsoft.ReportingServices.ReportDesign.Common, Version=14.0.0.0, Culture=neutral, PublicKeyToken-89845dcd8080cc91'

when trying to run the ReportViewer from the IDE, after installing Visual Studio 2017 (15.6.6) and SQL Server Data Tools - Visual Studio 2017 (version 14.0.16162.0 in control panel, version 15.1.61801.210 in the VS 2017 "Help/About..." - at this point I've given up on understanding Microsoft versioning).

Copying the DLL from:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Reporting Services

to:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS (different target path than noted in previous posts)

resolved the problem.

Montelongo answered 18/4, 2018 at 15:58 Comment(0)
S
3

Error in Preview of rdl reports in vs 2017:

If your VS version is Enterprise then copy your assembly to this path:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Micros‌​oft\SSDTRS

And if the version is Professional use this path instead:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSDTRS


Error in Building reports project in vs 2017:

If your VS version is Enterprise then copy your assembly to this path:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies

And if the version is Professional use this path instead:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PrivateAssemblies

Stramonium answered 8/8, 2017 at 7:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.