Articles in this section
Category / Section

How to resolve "System.IO.FileLoadException: Strong name validation failed for assembly 'Syncfusion.xxxx'" in Syncfusion assemblies while deploying the custom built libraries

2 mins read

I get the exception "System.IO.FileLoadException: Strong name validation failed for assembly 'Syncfusion.xxxx'" only when I deploy my custom built libraries.


Any Syncfusion DLLs built using the Assembly Manager are delayed signed and thus cannot be deployed to a different machine. They can only be used on the system that built them. The reason for this is that we do not allow users to ship files using our public keys if they have modified and built the files. Only our pre-built files can use our public keys. If you are making changes to the Grid source (and/or the Shared source), then you will have to compile the modified libraries. And you will have to assign them a new strong name key using the sn.exe utility found in the \Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin folder. If you open up the Assembly.cs file from the Syncfusion.Grid project files, you will see some notes on signing your assemblies.

1) First create a .snk file for your build by running sn.exe from a cmd prompt similar to:

sn -k myCompany.snk

(You can look up sn.exe in the online MS help for more information on this utility).  Then copy this .snk file to the same folder (..\Syncfusion\Essential Suite\Grid ) that holds the sf.publicsnk file that the grid normally uses.

2) Then load the C:\Program Files\Syncfusion\Essential Suite\Grid\Src\Syncfusion.Grid.sln into DevStu. Open up the AssemblyInfo.cs file and look for the reference to sf.publicsnk in the code and replace it with your .snk file ( myCompany.snk ). Also make sure the AssemblyDelaySign attribute is set to False. Now rebuild the library. These two steps assume you are not changing Shared.DLL and will just include the prebuilt Shared.Dll in your deployment. If not, then you would have to first do these steps with Shared and then use this Shared library with the grid in the above steps.

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment