VSTO_SUPPRESSDISPLAYALERTS not working on target PC

M

Mark B

OL2007, C#, VSTO.

Does the http://msdn.microsoft.com/en-us/library/ms269003(VS.80).aspx
article shown below relate to the deployment machines as well as the
development machine? On one of my Vista deployment test machines, no log
file has been created and no popup message boxes appear even though I have
added the environment variables as described below. I am trying to find the
cause of the Addin being made inactive even though it works fine on the
development machine.

....

Troubleshooting Add-ins Using a Log File and Error Messages

Visual Studio Tools for Office can write all errors that occur during
startup to a log file or display each error in a message box. By default,
these options are turned off for application-level projects. You can turn
the options on by adding and setting environment variables. To display each
error in a message box, set the VSTO_SUPPRESSDISPLAYALERTS variable to 0
(zero). You can suppress the messages by setting the variable to 1 (one). To
write the errors to a log file, set the VSTO_LOGALERTS variable to 1 (one).
Visual Studio Tools for Office creates the log file in the folder that
contains the application manifest. The default name is
<Manifestname>.manifest.log. To stop logging errors, set the variable to 0
(zero). For information about setting environment variables in Microsoft
Windows XP, see "How To Manage Environment Variables in Windows XP"
(http://support.microsoft.com/default.aspx?scid=kb;en-us;310519).
....
 
K

Ken Slovak - [MVP - Outlook]

That should work on deployment machines but only if the addin has actually
been loaded. If there are load errors that occur before the addin is started
(and also if the CAS hasn't been set correctly I believe) VSTO won't do the
logging because the VSTO addin never started.

See
http://blogs.msdn.com/vsod/archive/2008/04/22/Troubleshooting-com-add-in-load-failures.aspx
for load error logging information and also make sure you have set full
trust on your VSTO addin, which is required for a VSTO addin to run.
 
M

Mark B

Thanks Ken.

On further inspection of the Setup project my associate created, I notice he
didn't include the VSTO Runtime at all. So once I manually installed that on
the target machine after downloading it from Microsoft it all worked OK.

I now have asked him to research how to get that VSTO Runtime and the PIA
installed as part of the Setup project -- albeit silently. Hopefully he'll
be able to amend the Setup project to do that. It's for Enterprise rollout
so we don't want any user interaction whatsoever.

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top