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.
Preview Error Adding Extension Assembly to SSRS RDL Report in VS2022
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?