Using VS2019, I have created a VSTO AddIn WORD project. As we know the default template of this project creates a ThisAddIn class with two events ThisAddIn_Startup and ThisAddIn_Shutdown but no constructor. But when I try to create a constructor of this class as follows, I get the following error:
public ThisAddIn()
{
}
Error:
there is no argument given that corresponds to the required formal parameter 'factory' of 'AddInBase.AddinBase(Factory, IserviceProvider, string, string)'
Question: What is the cause of this error and how can I create a constructor in ThisAddIn class?
Some Background: I am trying to mimic functionalities of a Winform (Windows Forms) project into a VSTO office project. The Winform project has some code inside its constructor Form(){...} that I need to implement inside the constructor of ThisAddIn class of VSTO projects.