I am trying to get the all company list from tally through tally API. For that I am using the Tally.dll assembly but once I invoke the GetListOfCompanies() (defined in the Main class of the tally.dll) it's giving me an error message which I have been shared in my attachment.
Please let me know if is there any other approach to get the same or why I am getting the error message?
CodePudding user response:
You Said You are using Tally.dll but did not mentioned Source link How anyone know about that assembly without knowing source
But anyway if you are willing to Change Library I will Suggest Tally Connector (if using .Net Framework) Library which is open-source and developed by me
//To initiate instance
public Tally Ctally = new Tally();
//To get ListofCompanies opened in Tally
List<Company> OpenedCompanies = await Ctally.GetCompaniesList()
//To get companies in Path
List<Company> CompaniesinPath = await Ctally.GetCompaniesListinPath()
You are getting that error because you initiated directly Main method instead of initiating Entryclass provided by library
For Ex: in TallyConnector entry class is Tally, so I intiated like this
public Tally Ctally = new Tally();