none
SSRS 2012 Custom dll (security and email) upgrade to .net 4.5 error RRS feed

  • Question

  • Hi All,

    I have recently upgraded my SSRS from 2005 to 2012. There were some custom dlls (Email delivery and Security) built in .net 2.0 framework for SSRS 2005 which worked fine for SSRS 2012. But when I upgrade the framework for these dlls to .net 4.5, I get an error in SSRS "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded". "

    Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: Failed to create HTTP Runtime, Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportManager_MSSQLSERVER_0.  ---> System.Web.HttpException: Could not load file or assembly 'EMail' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. ---> System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'EMail' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. ---> System.BadImageFormatException: Could not load file or assembly 'EMail' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
    File name: 'EMail'"....

    It works fine when I deploy the dlls built in .net 2.0 but not when I upgrade it to .net 4.5. Can anyone let me know if SSRS 2012 does not support custom codes in .net framework 4.5 or above or I need to develop code in .net 4.5 with separate classes and just not upgrade the .net 2.0 code?

    Any help will be highly appreciated.

    Thursday, April 20, 2017 7:50 PM

Answers

  • Hi SrikantMishra,

    Based on my research, I find that SSRS does not support Microsoft .NET Framework 4.x-based assemblies. Therefore, you cannot load a .NET Framework 4.x assembly. You can refer to The .NET Framework 4.x assemblies are not supported in SQL Server Reporting Services for details. If you want this extension to works well, you need to use .NET Framework 2.0 or .NET Framework 3.5 in SSRS. Or you can load assemblies when Microsoft Reporting Server 2012 Service Pack 1 (SP1) in Microsoft SharePoint integration mode runs as a SharePoint shared service.

    If you have any question, please feel free to ask.

    Best regards,

    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by SrikantMishra Thursday, June 29, 2017 2:37 PM
    Friday, April 21, 2017 5:28 AM
    Moderator

All replies

  • Hi SrikantMishra,

    Based on my research, I find that SSRS does not support Microsoft .NET Framework 4.x-based assemblies. Therefore, you cannot load a .NET Framework 4.x assembly. You can refer to The .NET Framework 4.x assemblies are not supported in SQL Server Reporting Services for details. If you want this extension to works well, you need to use .NET Framework 2.0 or .NET Framework 3.5 in SSRS. Or you can load assemblies when Microsoft Reporting Server 2012 Service Pack 1 (SP1) in Microsoft SharePoint integration mode runs as a SharePoint shared service.

    If you have any question, please feel free to ask.

    Best regards,

    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by SrikantMishra Thursday, June 29, 2017 2:37 PM
    Friday, April 21, 2017 5:28 AM
    Moderator
  • Hi Zoe,

    Thanks for the inputs. I have decided to keep the dlls in .net 2.0 for now.

    Thanks & Regards,

    Srikant Mishra

    Monday, April 24, 2017 7:34 PM
  • Hi SrikantMisha,

    Did you solve this problem? If yes, please mark the corresponding reply as an answer so that it can help more community members having similar problem. If you still have any question, please feel free to ask.

    Best regards,

    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 26, 2017 1:23 AM
    Moderator