VSTO installation

The documentation says that I must install VS.NET 2005 Beta 2 first in order to create GAC. Then I must install MS Office. My question is if I have installed first MS Office and then VS.NET 2005 can I add Office PIA's to the GAC just reinstalling .NET programmability support in Office? Do I need to reinstall the whole Office just to have the PIA's added to GAC?

Thanks,
Martin Kulov

[392 byte] By [MartinKulov] at [2008-2-6]
# 1

Hi Martin,

You should be able to simply re-run the Office setup, and enable the .NET Programmability support for the various Office components and this should then install the Office PIAs.

If you have any questions please let me know via the posting.

Regards,

Ken Laws
MSFT

This posting is provided "AS IS" with no warranties, and confers no rights.

For more information regarding Visual Studio Tools for Office 2005:

Best of Blogs: Visual Studio 2005 Tools for Office
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landvsto2005_ta.asp

Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16

Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx

KenLaws at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 2

That’s what I thought also.

Thanks Ken.

I will let you know if I have any difficulties.

Martin Kulov
www.codeattest.com

MartinKulov at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 3
I also installed Office 2003 before VS2005b2.
The Office installation was a complete one, including the PIAs.
I have confirmed that the PIAs are indeed in the GAC (e.g. Microsoft.Office.Interop.Excel Version 11.0.0.0).

However, when I start an Excel project in VS2005, and choose a cell, most of the properties in the property window have the following (unalterable) value:
Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))

Any way to solve this?
Thanks

KlasMellbourn at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 4
That looks like the Excel globalization issue. See this article on MSDN for information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2005_ta/html/OfficeVSTOGlobalization.asp

Harry Miller

HarryMiller-MSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 5
Is it possible to automate the installation of the PIAs for MS Office?
When I open the VSTo application, the PIA'a should be checked for whther they are installed or not. If not, I want to automate this process rather than doing the manual setup process

Thanks in Advance

whidbey_boy at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 6
This might be tricky. If the user opens VSTO-enabled document and the PIAs are not installed then the customization will just fail without calling any user-code.
Assuming you do have some other application that precedes VSTO document you need to take a look at Office 2003 PIAs redistributable.
http://www.microsoft.com/downloads/details.aspx?FamilyID=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&DisplayLang=en
MishaShneerson at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 7
I already have fully working copies of Visual Studio 2003, Excel 2003 and VSTO. I have previously installed them all correctly. NOW, I want to upgrade my Visual Studio 2003 to Visual Studio 2005. Will I need to reinstall Excel 2003 and VSTO if I go ahead and do a VStudio 2005 upgrade?
ibeetb at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 8

Well, I am placing my excel workbook created with VSTO (VS2005 + Office ->Excel Workbook). Then, on compiling the the application, I place the excel application in network share. Now, if any user accesses the application from there, it prompts that PIAs are not installed. Is it possible that the PIA's get installed automatically without going through the proces of manually doing setup.

One option could be I place all the required PIAs in a MSI and execute the MSI first. But i want to avoid this option of running another file first.

I directly seek to run my excel application.

Please let me know ...

-thanks

whidbey_boy at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 9

In a scenario where Microsoft Office 2003 was installed to a computer using the default setup options, after the .NET Framework has been installed, the Office PIAs will be set to "Install on First Use".

In this scenario if a user opens a document which has a VSTO assembly attached, the PIAs should automatically install assuming that the installation source for Microsoft Office is available.

Otherwise, you would need some mechanism to get the PIAs installed in order to be able to run your VSTO application. The Office 2003 PIA redistributable package that Misha previously mentioned provides one mechanism for doing so.

Regards,

Ken Laws
MSFT

This posting is provided "AS IS" with no warranties, and confers no rights.

For more information regarding Visual Studio Tools for Office 2005:

Best of Blogs: Visual Studio 2005 Tools for Office
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landvsto2005_ta.asp

Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16

Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx

KenLaws at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 10

You should be able to install Visual Studio 2005 onto the computer without needing to reinstall Excel 2003 or Visual Studio 2003.

If you are going to install Visual Studio 2005 and want to keep Visual Studio 2003 I would suggest doing a side-by-side install which should leave VS 2003 intact.

A couple of issues that you most likely will encounter regarding your VSTO projects that you created with Visual Studio 2003 after the install of Visual Studio 2005.

1. Once Visual Studio 2005 is installed Microsoft Office will load your VSTO 2003 projects using the .NET 2.0 Framework, so you may need to add security policies to the 2.0 Framework in order for the project to load.

2. Once Visual Studio 2005 is installed you may encounter problems debugging your VSTO 2003 project from within Visual Studio 2003. This is again a result of Microsoft Office loading the project in the 2.0 Framework. A couple of options that you have for debugging would be to convert the project to a VSTO 2005 project and you could then debug using Visual Studio 2005 or you could also implement an app config file to force Microsoft Office to load the project in the 1.1. Framework.

I hope this helps!

Regards,

Ken Laws
MSFT

This posting is provided "AS IS" with no warranties, and confers no rights.

For more information regarding Visual Studio Tools for Office 2005:

Best of Blogs: Visual Studio 2005 Tools for Office
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_2003_ta/html/odc_landvsto2005_ta.asp

Visual Studio Tools for Office Forum
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=16

Visual Studio Tools for the Microsoft Office System
http://msdn.microsoft.com/office/understanding/vsto/default.aspx

KenLaws at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 11
Thanks a lot.

-regards.

whidbey_boy at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...
# 12
Do you have any idea of when the Culture error will be fixed! I always need to run this code before I do anything in Excel.
int nID = app.LanguageSettings.get_LanguageID(Microsoft.Office.Core.MsoAppLanguageID.msoLanguageIDUI);
System.Threading.Thread t = System.Threading.Thread.CurrentThread;
System.Globalization.CultureInfo myCulture = t.CurrentCulture;
t.CurrentCulture = new System.Globalization.CultureInfo(nID);
regards,
gudmunh
gudmunh at 2007-9-8 > top of Msdn Tech,Visual Studio Tools for Office,Visual Studio Tools for Office...