Deployment of VSTO application

N

NickP

Hi there,

I have a VSTO add-in that I am trying to deploy to a target system. I
have all known dependencies included except for the following files,

c:\Program Files\Common Files\Microsoft
Shared\VSTO\8.0\Microsoft.VisualStudio.Tools.Applications.Runtime.dll
c:\Program Files\Common Files\Microsoft
Shared\VSTO\8.0\Microsoft.VisualStudio.Tools.Applications.Runtime.tlb

I installed the VSTO SE Runtime onto the target system and I presume
that these are part of the VSTA runtime deployable package? If so, I was
under the impression that you had to pay royalty fees to distribute VSTA?
Or have I got that completely wrong?

Basically, at the moment my add-in just won't load, and this is the only
reason that I can think of as my code isn't actually being reached.

How do I include this files?

Many thanks in advance for your time and help.

BTW, I am not using click-once deployment, rather the install package
that VS 2005 creates with the add-in wizard.

Nick.
 
N

NickP

To be honest, this is a complete and utter joke, and terribly documented.

Even clicking the little link in VS 2005 bootstrapper "Check Microsoft
Uupdate for more distributable componants" takes you to the least most
helpful page it possibly can.

At the moment I have a huge tutorial open on using the Visual Studio 2005
Bootstrapper to Kick-Start your application. I got to this through a
tutorial on Deploying Visual Studio 2005 Tools for Office Second Edition
Solutions using Windows Installer. Both of which are the stereotypical,
crud that you read on MSDN, full of useless information.

So basically, am I right in saying that the VSTO SE SDK did not install
everything that I need to develop and delop software for the Office 2007
system? Bit shabby wouldn't you say?

Now I'm reading about how *I* need to make an XML manifest to be able to
distribute the necessary files.

Has anyone got any real, readable information that just cuts to the chase on
what it is I need to do to get this add-in working?

Many thanks in advance.

Nick.
 
N

NickP

*please excuse the spelling mistakes LOL!

NickP said:
To be honest, this is a complete and utter joke, and terribly documented.

Even clicking the little link in VS 2005 bootstrapper "Check Microsoft
Uupdate for more distributable componants" takes you to the least most
helpful page it possibly can.

At the moment I have a huge tutorial open on using the Visual Studio 2005
Bootstrapper to Kick-Start your application. I got to this through a
tutorial on Deploying Visual Studio 2005 Tools for Office Second Edition
Solutions using Windows Installer. Both of which are the stereotypical,
crud that you read on MSDN, full of useless information.

So basically, am I right in saying that the VSTO SE SDK did not install
everything that I need to develop and delop software for the Office 2007
system? Bit shabby wouldn't you say?

Now I'm reading about how *I* need to make an XML manifest to be able to
distribute the necessary files.

Has anyone got any real, readable information that just cuts to the chase
on what it is I need to do to get this add-in working?

Many thanks in advance.

Nick.
 
N

NickP

Right, I am now 1 step closer, although my Add-in still isn't working due to
the missing VSTA dll, I now have the quick and easy version of how to get
the redistributable packages for other peoples reference,

----

1. Goto this URL http://go.microsoft.com/fwlink/?linkid=83721 download
the package and install it. This contains the bootstrapper packages for
Visual Studio.
2. Once installed you need to copy them to the relevant locations, im my
case VS 2005, this is,

from

C:\Program Files\Microsoft Visual Studio 2005 Tools for Office SE
Resources\VSTO2005SE Windows Installer Sample Version 2\packages

to

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages

3. Once in the folder they should appear in the pre-requisites list in
VS.

----

Now if you don't want to include the setup.exe with the installation, and
only use the MSI file, you will need to put a check into the installer
manually, refer to the following URL for these instructions (mind line
truncations)

http://msdn2.microsoft.com/en-us/li...gh_creatinginstallerpackagestodeploysolutions

----

Don't get me wrong, this information is displayed on MSDN, it's just
surrounded by far too much junk. Now for my other issue...

Nick.
 
N

NickP

Hi there,

I've found the Runtime tlb on the destination system, it seemed that my
file search lied to me. But anyway, the dll is not there.

Am I supposed to distribute this DLL with my app? I have tried
distributing it *without* GAC registration and my add-in still fails to
load. The point at which it is failing is before the "Startup" method is
called, so none of my debug code is coming into play.

Also Word does not display any error dialog for the load failure.

TIA.

Nick.
 
J

Jialiang Ge [MSFT]

Hello Nick,

Would you help to check whether the correct version of VSTO runtime is
installed in the destination system? To check it, please go to the registry
setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\v8.0.50727
It should have a registry key there: Update = 2. If you could not find the
registry key or the registry key equal 1, please download the runtim from
http://www.microsoft.com/downloads/details.aspx?FamilyID=4468D8CB-B43E-4B09-
82F6-8BA3F7B5E935&DisplayLang=en#filelist
and reinstall it.

Another check is whether the assembly or folder in the VSTO solution is
granted with full trust permissions. Please refer to the MSDN article.
http://msdn2.microsoft.com/en-us/library/zdc263t0(VS.80).aspx

The third check is the language setting of Windows in the destination
system. If any end users run your solutions using an English version of
Visual Studio with non-English settings for Windows, install the Visual
Studio Tools for Office Language Pack to see Visual Studio Tools for Office
runtime messages in the same language as Windows. The Visual Studio Tools
for Office Language Pack is available from the Microsoft Download Center
(http://www.microsoft.com/downloads). Non-English versions of Visual Studio
automatically install the language pack.

For application-level add-ins, create the registry keys required to run the
add-in on the client computer. For more information, see Deploying
Application-Level
Add-ins.http://msdn2.microsoft.com/en-us/library/ms269007(VS.80).aspx

Hope it helps

If you have any other concern or need anything else, please feel free to
let me know.
Sincerely,
Jialiang Ge ([email protected], remove ¡®online.¡¯)
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box ¡°Tools/Options/Read: Get 300 headers at a time¡±
to see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided ¡°AS IS¡± with no warranties, and confers no
rights.
 
N

NickP

Hi Jialiang,
Would you help to check whether the correct version of VSTO runtime is
installed in the destination system? To check it, please go to the
registry
setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\v8.0.50727
It should have a registry key there: Update = 2. If you could not find the
registry key or the registry key equal 1, please download the runtim from
http://www.microsoft.com/downloads/details.aspx?FamilyID=4468D8CB-B43E-4B09-
82F6-8BA3F7B5E935&DisplayLang=en#filelist
and reinstall it.

I'm only presuming that you mean "v2.0.50727"? as I have VSTO SE
installed, as I have done it manually too with no luck. Update = 2 as well,
this is a check that I have upon installation that I mentioned in my
previous post.
Another check is whether the assembly or folder in the VSTO solution is
granted with full trust permissions. Please refer to the MSDN article.
http://msdn2.microsoft.com/en-us/library/zdc263t0(VS.80).aspx

Well following the instructions I found previously, I have a custom
action being run upon install which has the following properties,

(Name) Set Security
Condition <empty>
CustomActionData /assemblyName="MyOfficeAddin.dll"
/targetDir="[TARGETDIR]\" /solutionCodeGroupName="MyCompany.MyOfficeAddin"
/solutionCodeGroupDescription="Code group for MyOfficeAddin"
/assemblyCodeGroupName="MyOfficeAddin.dll"
/assemblyCodeGroupDescription="Code group for MyOfficeAddin"
/allUsers=[ALLUSERS]
EntryPoint <empty>
InstallerClass <True>
SourcePath F:\Visual Studio
2005\Projects\MyOfficeAddin\SetSecurity\obj\Release\SetSecurity.dll

--------
Quote from the article @
http://msdn2.microsoft.com/en-us/li...gh_creatinginstallerpackagestodeploysolutions

To add the custom action data for the Install method
1.. In the Custom Actions editor, expand Install.

2.. Right-click Primary output from SetSecurity (Active), and then click
Properties Window.

3.. In the Properties window, set the CustomActionData property to the
following string. Enter this as one long string, and change MyCompanyName to
your company name.

Copy Code
/assemblyName="ExcelApplication.dll" /targetDir="[TARGETDIR]\"
/solutionCodeGroupName="MyCompanyName.ExcelApplication"
/solutionCodeGroupDescription="Code group for ExcelApplication"
/assemblyCodeGroupName="ExcelApplication"
/assemblyCodeGroupDescription="Code group for ExcelApplication"
/allUsers=[ALLUSERS]--------

The custom action seems to run fine and an InstallState file is created
in the directory.

But the main thing that is concerning me is that Visual Studio 2005
clearly says that my project has a depedency on
Microsoft.VisualStudio.Tools.Applications.Runtime.dll, but this DLL is not
on the system even though VSTO is installed.

Could this be the problem? If I look at the COMM Ad-ins dialog in Word
and check the box for "MyOfficeAddin", and press okay, nothing happens. If
I go back into the dialog, the dialog is unchecked and the load behavior
still says "Load at Startup" rather than saying that an error had occured.

I notice that the location of the Add-in refers to the manifest file,
presumably this is correct?
The third check is the language setting of Windows in the destination
system. If any end users run your solutions using an English version of
Visual Studio with non-English settings for Windows, install the Visual
Studio Tools for Office Language Pack to see Visual Studio Tools for
Office
runtime messages in the same language as Windows. The Visual Studio Tools
for Office Language Pack is available from the Microsoft Download Center
(http://www.microsoft.com/downloads). Non-English versions of Visual
Studio
automatically install the language pack.

I shall add this to the prerequisites list, but I don't see that it can
be causing the current problem as I am developing and testing on my own
systems, which all have the same locale setup.
For application-level add-ins, create the registry keys required to run
the
add-in on the client computer. For more information, see Deploying
Application-Level
Add-ins.http://msdn2.microsoft.com/en-us/library/ms269007(VS.80).aspx

At current I am only trying to get it to install for the current user.
Hope it helps

Cheers for your help, unfortunately it's still not working, but I shall
have more looks. I am also confused as to why I am not recieving any error
information whatsoever, I can only presume that the load process is failing
so early on that it doesn't get detected...

Nick.
 
N

NickP

Hi Jialiang,

For some reason, after installing the language pack it appears to be
working! I'll give it a few tests on some other systems to see if this is
infact the issue, which is very surprising if it is, as all my systems are
setup the same. Anyways! I'm on my way properly now, thanks for your time
and help.

Nick.

NickP said:
Hi Jialiang,
Would you help to check whether the correct version of VSTO runtime is
installed in the destination system? To check it, please go to the
registry
setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\v8.0.50727
It should have a registry key there: Update = 2. If you could not find
the
registry key or the registry key equal 1, please download the runtim from
http://www.microsoft.com/downloads/details.aspx?FamilyID=4468D8CB-B43E-4B09-
82F6-8BA3F7B5E935&DisplayLang=en#filelist
and reinstall it.

I'm only presuming that you mean "v2.0.50727"? as I have VSTO SE
installed, as I have done it manually too with no luck. Update = 2 as
well, this is a check that I have upon installation that I mentioned in my
previous post.
Another check is whether the assembly or folder in the VSTO solution is
granted with full trust permissions. Please refer to the MSDN article.
http://msdn2.microsoft.com/en-us/library/zdc263t0(VS.80).aspx

Well following the instructions I found previously, I have a custom
action being run upon install which has the following properties,

(Name) Set Security
Condition <empty>
CustomActionData /assemblyName="MyOfficeAddin.dll"
/targetDir="[TARGETDIR]\" /solutionCodeGroupName="MyCompany.MyOfficeAddin"
/solutionCodeGroupDescription="Code group for MyOfficeAddin"
/assemblyCodeGroupName="MyOfficeAddin.dll"
/assemblyCodeGroupDescription="Code group for MyOfficeAddin"
/allUsers=[ALLUSERS]
EntryPoint <empty>
InstallerClass <True>
SourcePath F:\Visual Studio
2005\Projects\MyOfficeAddin\SetSecurity\obj\Release\SetSecurity.dll

--------
Quote from the article @
http://msdn2.microsoft.com/en-us/li...gh_creatinginstallerpackagestodeploysolutions

To add the custom action data for the Install method
1.. In the Custom Actions editor, expand Install.

2.. Right-click Primary output from SetSecurity (Active), and then click
Properties Window.

3.. In the Properties window, set the CustomActionData property to the
following string. Enter this as one long string, and change MyCompanyName
to your company name.

Copy Code
/assemblyName="ExcelApplication.dll" /targetDir="[TARGETDIR]\"
/solutionCodeGroupName="MyCompanyName.ExcelApplication"
/solutionCodeGroupDescription="Code group for ExcelApplication"
/assemblyCodeGroupName="ExcelApplication"
/assemblyCodeGroupDescription="Code group for ExcelApplication"
/allUsers=[ALLUSERS]--------

The custom action seems to run fine and an InstallState file is created
in the directory.

But the main thing that is concerning me is that Visual Studio 2005
clearly says that my project has a depedency on
Microsoft.VisualStudio.Tools.Applications.Runtime.dll, but this DLL is not
on the system even though VSTO is installed.

Could this be the problem? If I look at the COMM Ad-ins dialog in Word
and check the box for "MyOfficeAddin", and press okay, nothing happens.
If I go back into the dialog, the dialog is unchecked and the load
behavior still says "Load at Startup" rather than saying that an error had
occured.

I notice that the location of the Add-in refers to the manifest file,
presumably this is correct?
The third check is the language setting of Windows in the destination
system. If any end users run your solutions using an English version of
Visual Studio with non-English settings for Windows, install the Visual
Studio Tools for Office Language Pack to see Visual Studio Tools for
Office
runtime messages in the same language as Windows. The Visual Studio Tools
for Office Language Pack is available from the Microsoft Download Center
(http://www.microsoft.com/downloads). Non-English versions of Visual
Studio
automatically install the language pack.

I shall add this to the prerequisites list, but I don't see that it can
be causing the current problem as I am developing and testing on my own
systems, which all have the same locale setup.
For application-level add-ins, create the registry keys required to run
the
add-in on the client computer. For more information, see Deploying
Application-Level
Add-ins.http://msdn2.microsoft.com/en-us/library/ms269007(VS.80).aspx

At current I am only trying to get it to install for the current user.
Hope it helps

Cheers for your help, unfortunately it's still not working, but I shall
have more looks. I am also confused as to why I am not recieving any
error information whatsoever, I can only presume that the load process is
failing so early on that it doesn't get detected...

Nick.
 

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