问题
I have custom assembly which serves only 1 purpose - it contains localization strings along with static method to read them.
Assembly is successfully installed on server (SSRS's bin folder) and I have created function mapping static method to custom code - it all works. By works, I mean I can use this assembly to read strings, when I create localized version - it switches locale, etc...
However if I change or add any text to assembly - deploy it and make sure right DLL file is deployed SSRS seems to not see those changes. It looks like SSRS (or IIS) is caching somehow this DLL.
- I made sure that DLL is not in GAC
- I made sure DLL contains altered/added texts
- I have tried to restart SSRS and whole machine - didn't help
- I have removed DLL from whole machine - restarted it - didn't help
回答1:
Try to stop and start ssrs in Reporting Service Configuration Manager. I think this is only way to clear cache on custom library in ssrs.
回答2:
It looks like from some .NET version there are 2 physical locations of GAC:
C:\Windows\assembly
and
C:\Windows\Microsoft.NET\assembly\GAC_MSIL
I removed assembly from GAC using gacutil for .NET 4.0 and made sure it is not there by checking second location, apparently it did not remove assembly from 1st location and as it turned out the assembly was there.
Solution was to:
- Build library against .NET 2.0 or 3.5
- Clean both physical locations
- Remove assembly from SSRS folder
- Create windows install package to install assembly in GAC correctly
Update: The .NET Framework 4.x assemblies are not supported in SQL Server Reporting Services
来源:https://stackoverflow.com/questions/32629683/changes-to-custom-assembly-in-ssrs-are-ignored