未找到 SSRS 传递扩展

SSRS Delivery Extension not found

我正在尝试为 SSRS 开发交付扩展。 我用一个 class 创建了一个 dll。 class 实现了 IExtension 和 IDeliveryExtension 接口。我将构建的 dll 文件 (MyExtension.dll) 复制到报告的服务器 bin 文件夹中。它不在默认位置,但应该不是问题:

D:\SSRS\MSRS13.MyInstanceName\Reporting Services\ReportServer\bin

在rsreportserver.config中我在Extensions/Delivery中添加了这个:

<Extensions>
        <Delivery>
            <Extension Name="My Extension" Type="My.Extensions.MyExtension,MyExtension" Visible="true" />

在 rssrvpolicy.config 我有这样的东西:

<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust">
    <IMembershipCondition class="UrlMembershipCondition" version="1" Url="$CodeGen$/*" />
</CodeGroup>
<CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="MyCustomCodeGroup" Description="trying out delivery extension">
    <IMembershipCondition class="UrlMembershipCondition" version="1" Url="D:\SSRS\MSRS13.MyInstanceName\Reporting Services\ReportServer\bin\MyExtension.dll" />
</CodeGroup>

我在创建新订阅时没有看到扩展。在日志中,我不断收到此错误:

extensionfactory!ReportServer_0-1!155c!02/18/2019-17:34:56:: e ERROR: Exception caught instantiating My Extension report server extension: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: Konfigurationsfehler beim Berichtsserver: . ---> System.IO.FileNotFoundException: Could not load file or assembly 'MyExtension.dll' or one of its dependencies. The system cannot find the file specified.. library!ReportServer_0-1!1c78!02/18/2019-17:34:56:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.NotEnabledException: , Microsoft.ReportingServices.Diagnostics.Utilities.NotEnabledException: Die angeforderte Funktionalität ist zurzeit nicht aktiviert.;

我将 MyExtension.dll 添加到 GAC 并重新启动了报表服务器。我向 SSRS windows 服务帐户授予了 dll 文件的完全权限,并验证了该帐户可以看到它。仍然没有成功...

我错过了什么?

终于找到问题了,是.NET framework版本的问题。我的程序集是为 .NET Framework 4.6.1 编译的。 当我切换到 .NET Framework 3.5 时,一切正常。

详情如下: https://support.microsoft.com/en-us/help/2869522/the-net-framework-4-x-assemblies-are-not-supported-in-sql-server-repor

Microsoft SQL Server Reporting Services (SSRS) supports extensions by including custom extensions and custom code. However, SSRS does not support Microsoft .NET Framework 4.x-based assemblies. Therefore, you cannot load a .NET Framework 4.x assembly.

还有一个问题,因为我无法引用使用 .NET Framework 构建的程序集 4.x ...

无论如何,我希望这可以帮助某人...