Custom Assembly in a 2017 RDLC Report

  • Thread starter Thread starter Lanis Ossman
  • Start date Start date
L

Lanis Ossman

Guest
Hey all:

First, please let me emphasize that I need a solution for RDLC reports in VS 2017. I am printing or creating a PDF for the RDLC in a Windows app, if that matters. I've seen solutions for earlier VS and RDLC versions, but they don't seem 100% applicable to 2017.

Also, I have another RDLC, without the custom assembly, working correctly.

Error:

That assembly does not allow partially trusted callers.

I suspect this error is from the GenCode128.DLL custom assembly noted below

First, per one article, I tried to simply load the custom assembly into my GAC, but no-go.

Here's the more involved approach I tried via pieces of multiple articles:

ALL on my local development PC at this point

  • Strongly name the custom assembly assembly.
  • Copy the custom assembly DLL into the following folders:
    • C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS
    • C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PrivateAssemblies
  • In C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS\RSPreviewPolicy.config:
    • Set ALL PermissionSetName attributes to FullTrust
      • This may have been overkill, but followed the article
    • I also saw something in yet another article about adding a custom CodeGroup for my assembly, but wasn’t clear where to do that.
  • Added the following report references:
    • GenCode128, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ad394d3897d5fe98
      • From the above PrivetAssemblies folder
    • System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
  • I get the error at runtime, not compiling.

Continue reading...
 
Back
Top