I’m trying to generate wrapper classes using ClassGenerator.exe and running it as a CLI tool with the config file.
I’m getting the following error as soon as executable starts:
C:\Users\abaranov\Documents\Work\_AcumaticaSoftware\TestSDK_22_211_0034_35\ClassGenerator>ClassGenerator.exe
Wrapper generation has started, please wait. It may take up to 5 minutes for the first wrapper to be successfully generated.
Process FAILED - so301000
System.Exception: Unable to get screen so301000 with url /CstDesigner/abaranov_PCBCustomizations/so301000.aspx ---> System.Exception: Exception of type System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.; StackTrace: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: This method cannot be called during the application's pre-start initialization phase.
Configuration file ClassGenerator.exe.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="SitePhysicalPath" value="C:\AcumaticaInstances\hemasource" />
<add key="GenResultPath" value="C:\Users\abaranov\source\repos\gitlab-hemasource\TestSDK_22_211_0034_35\ClassGenerator\Out" />
<add key="Username" value="abaranov" />
<add key="Namespace" value="GeneratedWrappers.Acumatica" />
<add key="ClearOutput" value="true" />
<add key="FilenameFilter" value="SO301000" />
<!--<add key="PagesList" value="list.txt"/>
<add key="PagesParameters" value="ParamsPP.txt"/>
<add key="GenericInquiryParameters" value="ParamsGI.txt"/>
<add key="PagesListAttribute" value="exclude"/>
<add key="PagesListAttribute" value="include"/>-->
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
Best answer by AaronB
View original