Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Microsoft.CrmSdk.CoreTools v9.1.0.115 #461

Open
tylersand opened this issue Jul 15, 2022 · 5 comments
Open

Incompatibility with Microsoft.CrmSdk.CoreTools v9.1.0.115 #461

tylersand opened this issue Jul 15, 2022 · 5 comments

Comments

@tylersand
Copy link

When using the earlybound.bat with the latest Microsoft.CrmSdk.CoreTools v9.1.0.115, it throws an exception regarding "Parameter count mismatch". Works fine with v9.1.0.79.

Generating early bound types
Searching for plugin config in 'C:\demos\DataversePlugins\spkl..'
Using Config 'C:\demos\DataversePlugins'
Target C:\demos\DataverseSolution\packages\spkl.1.0.640\tools
Running C:\demos\DataverseSolution\packages\spkl.1.0.640\tools....\Microsoft.CrmSdk.CoreTools.9.1.0.115\content\bin\coretools\CrmSvcUtil.exe /connstr:"AuthType=OAuth;
AppId=xxx;
RedirectUri=app://xxx;
TokenCacheStorePath=C:\Users\tyler\AppData\Roaming\spkl\TokenCache;UserName=xxx;Url=https://xxx.crm.dynamics.com;LoginPrompt=Auto" /out:"C:\demos\DataversePlugins\EarlyBoundTypes.cs" /namespace:"DataversePlugins" /serviceContextName:"XrmSvc" /GenerateActions:"False" /codewriterfilter:"spkl.CrmSvcUtilExtensions.FilteringService,spkl.CrmSvcUtilExtensions" /codewritermessagefilter:"spkl.CrmSvcUtilExtensions.MessageFilteringService,spkl.CrmSvcUtilExtensions" /codegenerationservice:"spkl.CrmSvcUtilExtensions.CodeGenerationService, spkl.CrmSvcUtilExtensions" /metadataproviderqueryservice:"spkl.CrmSvcUtilExtensions.MetadataProviderQueryService,spkl.CrmSvcUtilExtensions"
CrmSvcUtil : CRM Service Utility [Version 9.1.0.118]
c 2022 Microsoft Corporation. All rights reserved

Begin Reading Metadata from MetadataProviderService
Loading config from 'C:\demos\DataverseSolution\packages\Microsoft.CrmSdk.CoreTools.9.1.0.115\content\bin\coretools\spkl.crmsvcutil.config'
Begin Reading Metadata from Server
Read 3 Entities
Read 0 Global OptionSets
Read 1 SDK Messages
Completed Reading Metadata from Server - 00:00:08.1054155
Completed Reading Metadata from MetadataProviderService - 00:00:10.3559160

Begin Writing Code File
Exiting program with exception: Parameter count mismatch.
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Reflection.TargetParameterCountException: Parameter count mismatch.
at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at spkl.CrmSvcUtilExtensions.CodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.WriteCode(IOrganizationMetadata organizationMetadata)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source : mscorlib
Method : InvokeArgumentsCheck
Date : 11:09:36 AM
Time : 7/15/2022
Error : Parameter count mismatch.
Stack Trace : at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at spkl.CrmSvcUtilExtensions.CodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.WriteCode(IOrganizationMetadata organizationMetadata)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)

CrmSvcUtil exited with error 2
Error Code=1

@PlanBernhard
Copy link

Same issue here. The latest working version of Microsoft.CrmSdk.CoreTools is 9.1.0.92 .

Exiting program with exception: Parameteranzahlkonflikt.
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Reflection.TargetParameterCountException: Parameteranzahlkonflikt.
bei System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei spkl.CrmSvcUtilExtensions.CodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
bei Microsoft.Crm.Services.Utility.CrmSvcUtil.WriteCode(IOrganizationMetadata organizationMetadata)
bei Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
bei Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source : mscorlib
Method : InvokeArgumentsCheck
Date : 11:49:27
Time : 20.07.2022
Error : Parameteranzahlkonflikt.
Stack Trace : bei System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
culture)
bei System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
bei spkl.CrmSvcUtilExtensions.CodeGenerationService.Write(IOrganizationMetadata organizationMetadata, String language, String outputFile, String targetNamespace, IServiceProvider services)
bei Microsoft.Crm.Services.Utility.CrmSvcUtil.WriteCode(IOrganizationMetadata organizationMetadata)
bei Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
bei Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)

CrmSvcUtil exited with error 2
Error Code=1

@PlanBernhard
Copy link

PlanBernhard commented Jul 20, 2022

It seems like MS changed some options. Here a comparison of the output of CrmSvcUtil against the latest
stable version

image
image

@PlanBernhard
Copy link

The same for the CrmSvcUtil.xml
image
image
image
image
image

@scottdurow
Copy link
Owner

Thanks all - it'll mean the next version of spkl will require the latest SDK core tools.
For now -the workaround is to stay on the older version.

@PlanBernhard
Copy link

Thanks Scott

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants