Event Logging (2007 System)

Starting in Visual Studio 2008 Service Pack 1 (SP1), you can use the event viewer in Windows to see error messages that are captured by the Visual Studio Tools for Office runtime when you install or uninstall Visual Studio Tools for Office solutions. You can use these messages from the event logger to resolve installation and deployment problems.

Reading the Event Log

Open Event Viewer and filter for the events you want to see.

To read the event log in Windows Server 2003 and Windows XP

  1. In Control Panel, open Administrative Tools.

  2. Start Event Viewer.

  3. In the list of event logs, select Application.

  4. On the View menu, click Filter.

  5. In the Event source list, select VSTO 3.0.

  6. For installation events, in the Event ID box, type 4096.

  7. Click OK to see the filtered view.

To read the event log in Windows Vista and Windows Server 2008

  1. In Control Panel, open Administrative Tools.

  2. Start Event Viewer.

  3. Expand Windows Logs.

  4. In the list of event logs, select Application.

  5. On the Action menu, click Filter Current Log.

  6. In the Event source list, select VSTO 3.0.

  7. For installation events, in the Event ID box, type 4096.

  8. Click OK to see the filtered view.

The event viewer includes the following information:

  • The location of the deployment manifest for the solution.

  • A message that describes the cause of the error or exception.

These error messages can help you determine the reason for an installation problem, such as an untrusted certificate, an untrusted document location, or an invalid deployment manifest.

After a Visual Studio Tools for Office solution is uninstalled, the error messages remain in the event log.

To show or log error messages when a Visual Studio Tools for Office solution is running, see Debugging in Document-Level Projects and Debugging in Application-Level Projects.

Localization

The language of the error message is determined by the Visual Studio Tools for Office runtime language. For instance, if the end user computer has the Japanese language pack for Visual Studio Tools for Office installed, the error message is written to the event log in Japanese.

Disabling the Event Logger

By default, the event logger is enabled when you install or uninstall Visual Studio Tools for Office solutions. You can disable the event logger by setting the VSTO_EVENTLOGDISABLED environment variable to "1" (one). 

To disable the event log

  1. In Control Panel, open System.

  2. On the Advanced tab, click Environment Variables.

  3. In the System variables pane, click New.

  4. In the New System Variable dialog box, type VSTO_EVENTLOGDISABLED in the Variable name box.

  5. In the Variable value box, type 1.

  6. Click OK.

See Also

Concepts

Deploying Office Solutions (2007 System)

Troubleshooting Office Solution Deployment (2007 System)

Change History

Date

History

Reason

July 2008

Added topic.

SP1 feature change.