Articles in this section
Category / Section

How to check for parameter count mismatch parse error in TargetParameterCountException when two different Framework versions of assemblies have been referred?

2 mins read

Problem

How to check TargetParameterCountException: Parameter count mismatch parse error, while running the sample when two different framework version assemblies has been referred? This issue occurs when you move a project from one framework to another framework and referred assemblies from GAC reference, resulting in assembly references in both framework versions from GAC.

Reason

The “Parameter count mismatch” error can occur due to conflict between two different versions of assemblies referred. This issue occurs when you refer assemblies from GAC reference and when Version key is not specified in assembly tag in Web.config file. Therefore, the application refers assemblies from two different framework versions (for example, 3.5 and 4.0 framework)

Solution

To overcome the conflict with two different DLL versions, check whether two different framework version of same assemblies (for example, 10.204.0.56 and 10.203.0.56) are referred in your application. When you are using 4.0 framework in your application then remove the 3.5 version assemblies from your reference. Once you move to new framework, you can register the new version “Version=10.204.0.56” in the ASPX page. Modify the DLL version in the web.config page and also in ASPX page in your sample as follows.

 web.config

   <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="Syncfusion.Tools.Web, Version=10.204.0.56, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89"/>
        <add assembly="Syncfusion.Shared.Web, Version=10.204.0.56, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89"/>
        <add assembly="Syncfusion.Core, Version=10.204.0.56, Culture=neutral, PublicKeyToken=632609B4D040F6B4"/>
        <add assembly="Syncfusion.Shared.Base, Version=10.204.0.56, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89"/>
        <add assembly="Syncfusion.Grid.Base, Version=10.204.0.56, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89"/>
        <add assembly="Syncfusion.Tools.Base, Version=10.204.0.56, Culture=neutral, PublicKeyToken=3D67ED1F87D44C89"/>
        </assemblies>
    </compilation>
<httpRuntime targetFramework="4.0"/>

ASPX

<%@ Register Assembly="Syncfusion.Tools.Web, Version=10.204.0.56, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" Namespace="Syncfusion.Web.UI.WebControls.Tools" TagPrefix="syncfusion" %>
<syncfusion:richtexteditor id="RichTextEditor" runat="server" height="420" width="620"></syncfusion:richtexteditor>

 

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