Consider the following scenario:
When you are developing the custom application by using VSA, you may experience the following problem. When the custom application calls the Microsoft.VisualBasic.Vsa.VsaEngine.Compile method, an exception is thrown by the VSA Visual Basic Runtime to the host. The host may trap the exception, and the user may receive the following error message:
When you try to run macros in the custom application, you may experience one or more of the following symptoms:
- You create a custom application by using the Microsoft .NET Framework 2.0.
- The custom application uses the Microsoft Visual Studio for Applications (VSA) Visual Basic Runtime.
- You run the custom application on a system that has been updated to run a later version of the Microsoft .NET Framework common language runtime (CLR).
When you are developing the custom application by using VSA, you may experience the following problem. When the custom application calls the Microsoft.VisualBasic.Vsa.VsaEngine.Compile method, an exception is thrown by the VSA Visual Basic Runtime to the host. The host may trap the exception, and the user may receive the following error message:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
Alternatively, the host may ignore the exception, and one of the following symptoms may occur:- The host fails unexpectedly when the user tries to run the macro that the user just compiled.
- The host does not handle the macro in any way.
When you try to run macros in the custom application, you may experience one or more of the following symptoms:
- You receive an error message that a macro cannot be generated or run.
- You receive an error message that a macro or assembly cannot be loaded.
- The host application may not start or may exit unexpectedly.
- Although the host application does not report an error, the macro does not run, and the application appears to have done nothing.