Preview Error Adding Extension Assembly to SSRS RDL Report in VS2022

James, Alec (Basingstoke) 0 Reputation points
2024-04-25T20:50:57.0033333+00:00

I am using Visual Studio 2022 with the Microsoft Reporting Services Projects extension. I've created a Reporting Services project and added a simple report. In this report, I included a textbox with the expression =User!Language and successfully previewed the report.

Next, I developed a DLL named 'TestExtension' (targeting .NET 4.8 Any CPU) containing a static class with a method GetText() that returns 'Hello World'. However, when I try to reference this DLL in my report—either by adding the full path to TestExtension.dll, placing it in the GAC, or in the directory C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\PrivateAssemblies—and preview the report, I encounter the following error: "TestExtension.dll: The name or codebase is incorrect (HRESULT 0x80131047)."

Can anyone advise what might be causing this issue and how to resolve it?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,856 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,927 questions
{count} votes

1 answer

Sort by: Most helpful
  1. James, Alec (Basingstoke) 0 Reputation points
    2024-05-01T16:16:39.5733333+00:00

    I've identified the problem. I must copy the extension class library to C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS, not to the private assemblies folder. Then, to add the reference, I use the ellipsis (browse) button to navigate to and select my extension.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.