NuGet Package for Syncfusion.EJ2.MVC5.18.2.0.57 pointing to the wrong Licensing file

I have found a work around for this issue. But here is how you replicate it:


Create a MVC 5 application to use .NET 4.7.2 (I guess it would work for anything higher than 4.6)
Go to NuGet packages and install Syncfusion.EJ2.MVC5
This will install Syncfusion.EJ2.JavaScript and Syncfusion.Licensing.
Add a simple Syncfusion Control to the main page. And all the other requirements to make that control work, licensing modifications to all required files
Run the app. 
During the start up you should get an exception on the @Html.EJS().ScriptManager() line in the _Layout.cshtml. Or wherever you put this line in.

Could not load file or assembly 'Syncfusion.Licensing, Version=18.2450.0.57, Culture=neutral, PublicKeyToken=632609b4d040f6b4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

What I found is really funny. 
Syncfusior.License has a folder for net46 which is the one it uses and copies it to the bin directory, the problem is Syncfusion.EJ2.MVC5 does not have a net46 folder it only has a net45. So that is the one it copies, but it has a dependency on the net45 licensing file. 

Am I missing something? Did I do something wrong? I did not start a Syncfusion project because I am refactoring this application to use Syncfusion.


My stupid work around:
I manually copy the dll from the .\net45 folder in the Syncfusion.License directory to the bin directory. So much fun!!!!




1 Reply 1 reply marked as answer

SU Sridurgha Uthayakumaran Syncfusion Team September 22, 2020 03:35 PM UTC

Hi Bruno, 

Sorry for the delay in getting back to you. 

We have validated the reported query and unfortunately we are not able to reproduce the same. We suspect that the dependentAssembly for Syncfusion.Licensing package has not been included in Web.config file. Thus we would like to suggest you to add the dependentAssembly for Syncfusion.Licensing package in Web.config file as mentioned below to overcome the issue. 

      <dependentAssembly> 
        <assemblyIdentity name="Syncfusion.Licensing" publicKeyToken="632609b4d040f6b4" culture="neutral" /> 
        <bindingRedirect oldVersion="0.0.0.0-18.2460.0.59" newVersion="18.2460.0.59" /> 
      </dependentAssembly> 

  
Also, we would like to let you know that copying dll from one folder to other is not good standard and we don’t recommend the same practice to resolve the issue. 

Please get back to us if you need any further assistance on this. 
  
Regards, 
Sridurgha U 
 


Marked as answer
Loader.
Up arrow icon