ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

ITsVISTA KB-Link: KB928208

Custom applications that use the Visual Studio for Applications Visual Basic Runtime may be unable to compile macros or to run macros

Consider the following scenario:

  • 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).

In this scenario, the custom application may behave incorrectly or may generate errors. These problems occur when you try to compile macros or when you try to run macros in the custom application.

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: 0×8007000B)

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.

In the latter case, the CLR will close the application because the application had an unhandled exception.

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.
There is a download that resolves this issue. See Hotfixes for details. This issue is resolved in SP1.

For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB928208.

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Comments

  • There are no comments yet...Come on, share your thoughts!

Leave a Comment