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.
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)
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.
|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|