We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

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

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

ASPX

 

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework: Product Version:
2722 11/19/2014 11/26/2014 ASP.NET Web Forms (Classic) Tools 4 10.2.0.56
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.