You may receive the System.Reflection.TargetInvocationException unhandled exception when you use the FormsFactory class to open a form in Small Business Accounting (906467)
The information in this article applies to:
- Microsoft Office Small Business Accounting 2006
- Microsoft Office Small Business Management Edition 2006
- Microsoft Office Small Business Accounting 2006 Software Development Kit 1.2
SYMPTOMSIn Microsoft Office Small Business Accounting, you may receive the System.Reflection.TargetInvocationException unhandled exception when you use the FormsFactory class to open a form that has a user interface add-in installed.CAUSEThis problem occurs because the Microsoft .NET Framework deserializer that is defined in the mscorlib assembly tries to load the assembly in which the object to be deserialized is defined. The .NET Framework cannot locate the Small Business Accounting assemblies because the application that made the call was started from a different directory.RESOLUTIONTo resolve this problem, you must explicitly create an application domain. You must set up this domain to include the path of Small Business Accounting and the path of the integrating application. To do this, follow these steps: - Install Small Business Accounting and the integrating application in the same root directory.
Note The default installation directory for Small Business Accounting is C:\Program Files\Microsoft Small Business\Small Business Accounting. If this directory is the directory where Small Business Accounting is installed, use the following installation paths:- \Program Files\Microsoft Small Business\Small Business Accounting
- \Program Files\Microsoft Small Business\My Integration
- Put the code that opens the form by using the FormsFactory class in its own class. Also, put the code that calls the FormsFactory class in its own class. To do this, see the code in the "More Information" section.
Modification Type: | Minor | Last Reviewed: | 4/4/2006 |
---|
Keywords: | kbtshoot kbMBSMigrate kbprb KB906467 kbAudITPRO kbAudDeveloper |
---|
|