0

Good day everyone,

I have this problem where my ssrs cant load the module which is a zxing custom DLL. I can preview it but whenever I try to deploy it, the error occurs which says

"Error while loading code module: zxing, Version=0.15.0.0, Culture=neutral, PublicKeyToken=token' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

I am using ssrs 2014, sql data tools 2012 and .Net 4.0.1. I already copied the DLL into the following folders:

C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER_EMA\Reporting Services\ReportServer\bin

and

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

I also configured the rssrvpolicy with the following:

<CodeGroup
    class="UnionCodeGroup"
    version="1"
    PermissionSetName="FullTrust"
    Name="zxing"
    Description="">
 <IMembershipCondition
        class="UrlMembershipCondition"
        version="0.15.0.0"
        PublicKeyToken="4e88037ac681fe60"
        Url="C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER_EMA\Reporting Services\ReportServer\bin\zxing.dll"
               />

I am forgetting something? I would really appreciate any help, I tried what I found. Thanks.

xSecur
  • 11
  • 1
  • 6
  • You have to put this dll in GAC: https://stackoverflow.com/questions/32629683/changes-to-custom-assembly-in-ssrs-are-ignored –  Jul 14 '17 at 08:07
  • @RafalZiolkowski Good day, I used the command "gacutil -i zxing.dll" and for some reason, .Net 4.0 put it into C:\Windows\Microsoft .Net\assembly and not on C:\Windows\assembly. Thanks for you reply. – xSecur Jul 14 '17 at 08:09
  • 1
    Problem is SSRS doesn't support .NET 4.0: https://support.microsoft.com/en-us/help/2869522/the-.net-framework-4.x-assemblies-are-not-supported-in-sql-server-repo You have to build you assembly against .NET 2.0 or 3.5 –  Jul 14 '17 at 08:11
  • @RafalZiolkowski I see, that enlightened me :) Thank you very much Rafael :) I didn't know that until now. I really appreciate it :) – xSecur Jul 14 '17 at 08:15
  • Sure thing! Me neither before I encountered this issue :) –  Jul 14 '17 at 08:16
  • @RafalZiolkowski Thank you really :) been stuck to this like a week, been configuring the config etc, how silly that the problem is the .Net 4.0 itself :D I'm really grateful you pointed it out :) – xSecur Jul 14 '17 at 08:19

0 Answers0