Addin Installer does not always work?

E

eschneider

The Installer created by VS does not always work.

Anyone have any ideas on how to fix or troubleshoot the problem?

Thanks,
Eric
 
J

\Ji Zhou [MSFT]\

Hello Eric,

I am sorry for that we are encountering the problem in the deployment. From
your another post, I see that the problematical project is a VSTO one,
right? If not, please feel free to let me know the problem context so that
I can provide a future assistance.

Yes, there are some additional work need to do when we deploy a VSTO
Add-in, but that depends on which version of VSTO Runtime we are using. The
following is the relationship between the project type and the runtime
version.

1.Office 2003 Add-in created by VSTO SE(Visual Studio 2005) uses the VSTO
Runtime 2.0
2.Office 2007 Add-in created by VSTO SE(Visual Studio 2005) uses the VSTO
Runtime 2.0
3.Office 2003 Add-in created by VSTO SE(Visual Studio 2005) uses the VSTO
Runtime 2.0
4.Office 2007 Add-in created by VSTO3 (Visual Studio 2008) uses the VSTO
Runtime 3.0

When we are working on the first three kinds of projects, Visual Studio
will create a default Setup project during the solution creating. In this
case, we need to take care of three things,

1.Prerequisites, include: Corresponding version of Office PIAs(Check it in
C:\Windows\Assembly to see if Microsoft.Office.Interop.Outlook 12.0
exists), VSTO Runtime 2.0, .NET Framework 2.0. Make sure we install these
before we install our Office Add-In.

2.Registry. This system default Setup project has already added the
registry information for us.

3.Permission. We need to manually add a custom action which is used to
grant permission to the Add-in assembly.

The following two MSDN documents are written for this scenario,
http://msdn.microsoft.com/en-us/library/bb332051.aspx
http://msdn.microsoft.com/en-us/library/bb332052.aspx


If we are using the fourth project type, since the VSTO3 default deployment
mode has changed to ClickOnce, Visual Studio will not create a Setup
project for us. However, we can still add a Setup project manually and
deploy our Add-in via the MSI. There is a step by step video for this in
the VSTO Team blog here,
http://blogs.msdn.com/vsto/archive/2008/10/02/how-do-i-deploy-application-le
vel-office-2007-solutions-with-windows-installer-mary-lee.aspx

Besides these, there is an unsupported tool named AddInSpy which can help
for general troubleshooting in Office COM Add-ins deployment. Have a look
at Andrew's article,
http://blogs.msdn.com/andreww/archive/2008/09/30/addinspy.aspx

Please let me know if my suggestion helps or not. If you have any other
questions or concerns, please do not hesitate to let me know and I will be
glad to be of future help.

Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

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://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
E

eschneider

First I'm deploying to Office 2007 and using VS 2008.

And when I created the project initialy it added a set-up project
automaticly. I was following some MS walk through. I Think it was this:
http://msdn.microsoft.com/en-us/library/bb410115.aspx : Creating the Add-In
Solution

Since then I have a full project built arround this, I guess I could move to
the Office 2007 templates, assuming it will work. At this point I don't have
much faith in deploying Office solutions. All the documentation seems to be
a complete mess and there is very little in book form also.

I created a new template: Word 2007 Addin

When running from VS I get the following error:
Could not load file or assembly 'Microsoft.Office.Interop.Word,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one
of its dependencies. The system cannot find the file specified.


************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly
'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system
cannot find the file specified.
File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0,
Culture=neutral, PublicKeyToken=71e9bce111e9429c'
at
Microsoft.VisualStudio.Tools.Office.Word.Internal.IWordHostItemProviderProxy..ctor(IHostItemProviderExtendedContract
hostItemProvider)
at
Microsoft.VisualStudio.Tools.Office.Word.Internal.IWordHostItemProviderProxy.GetProxy(IHostItemProviderExtendedContract
contract)
at
Microsoft.VisualStudio.Tools.Office.Word.Internal.LocalWordServiceProvider.GetService(Type
serviceType)
at
Microsoft.VisualStudio.Tools.Applications.Internal.LocalServiceProvider.System.IServiceProvider.GetService(Type
serviceType)
at
Microsoft.VisualStudio.Tools.Office.EntryPointComponentBase.Microsoft.VisualStudio.Tools.Applications.Runtime.IEntryPoint.Initialize(IServiceProvider
hostContext)
at
Microsoft.VisualStudio.Tools.Applications.AddInAdapter.ExecutePhase(ExecutionPhases
executionPhases)
at
Microsoft.VisualStudio.Tools.Office.Internal.OfficeAddInAdapter.InitializeEntryPointsHelper()




************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.21022.8 built by: RTM
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.AddIn
Assembly Version: 3.5.0.0
Win32 Version: 3.5.21022.8 built by: RTM
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Security
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Security/2.0.0.0__b03f5f7f11d50a3a/System.Security.dll
----------------------------------------
System.AddIn.Contract
Assembly Version: 2.0.0.0
Win32 Version: 3.5.21022.8 built by: RTM
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn.Contract/2.0.0.0__b03f5f7f11d50a3a/System.AddIn.Contract.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll
----------------------------------------
System.Deployment
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Contract.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Contract.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.v9.0.dll
----------------------------------------
USAF_WordAddIn
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase:
file:///C:/Projects/USAF_WordAddIn/USAF_WordAddIn/bin/Debug/USAF_WordAddIn.DLL
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.Common.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Contract.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
CodeBase:
file:///C:/WINDOWS/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0
Assembly Version: 9.0.0.0
Win32 Version: 9.0.21022.8
CodeBase:
file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0.dll
----------------------------------------

Thanks,

Eric


""Ji Zhou [MSFT]"" said:
Hello Eric,

I am sorry for that we are encountering the problem in the deployment.
From
your another post, I see that the problematical project is a VSTO one,
right? If not, please feel free to let me know the problem context so that
I can provide a future assistance.

Yes, there are some additional work need to do when we deploy a VSTO
Add-in, but that depends on which version of VSTO Runtime we are using.
The
following is the relationship between the project type and the runtime
version.

1.Office 2003 Add-in created by VSTO SE(Visual Studio 2005) uses the VSTO
Runtime 2.0
2.Office 2007 Add-in created by VSTO SE(Visual Studio 2005) uses the VSTO
Runtime 2.0
3.Office 2003 Add-in created by VSTO SE(Visual Studio 2005) uses the VSTO
Runtime 2.0
4.Office 2007 Add-in created by VSTO3 (Visual Studio 2008) uses the VSTO
Runtime 3.0

When we are working on the first three kinds of projects, Visual Studio
will create a default Setup project during the solution creating. In this
case, we need to take care of three things,

1.Prerequisites, include: Corresponding version of Office PIAs(Check it in
C:\Windows\Assembly to see if Microsoft.Office.Interop.Outlook 12.0
exists), VSTO Runtime 2.0, .NET Framework 2.0. Make sure we install these
before we install our Office Add-In.

2.Registry. This system default Setup project has already added the
registry information for us.

3.Permission. We need to manually add a custom action which is used to
grant permission to the Add-in assembly.

The following two MSDN documents are written for this scenario,
http://msdn.microsoft.com/en-us/library/bb332051.aspx
http://msdn.microsoft.com/en-us/library/bb332052.aspx


If we are using the fourth project type, since the VSTO3 default
deployment
mode has changed to ClickOnce, Visual Studio will not create a Setup
project for us. However, we can still add a Setup project manually and
deploy our Add-in via the MSI. There is a step by step video for this in
the VSTO Team blog here,
http://blogs.msdn.com/vsto/archive/2008/10/02/how-do-i-deploy-application-le
vel-office-2007-solutions-with-windows-installer-mary-lee.aspx

Besides these, there is an unsupported tool named AddInSpy which can help
for general troubleshooting in Office COM Add-ins deployment. Have a look
at Andrew's article,
http://blogs.msdn.com/andreww/archive/2008/09/30/addinspy.aspx

Please let me know if my suggestion helps or not. If you have any other
questions or concerns, please do not hesitate to let me know and I will be
glad to be of future help.

Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

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://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
J

\Ji Zhou [MSFT]\

Hello Eric,

The posted exception text

"Could not load file or assembly 'Microsoft.Office.Interop.Word,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one
of its dependencies. The system cannot find the file specified."

usually means that we have not installed the Office 2007 PIA on the develop
machine. But that is a necessary component to program against .NET Office
project.

Please try the following steps to resolve the issue,

1.Open the Control Panel and double click the Programs and Features

2.Find the Microsoft Office Enterprise 2007, right click it and choose the
Change option

3.Select the radio button Add or Remove Features and click Continue

4.Select the .NET Programmability Support under Microsoft Office Word and
click Continue to go on.

After we install the PIA correctly, we should find the
Microsoft.Office.Interop.Word in C:\Windows\Assembly virtual directory.
Please let me know if this fixes the issue. And if you have any future
questions or concerns, I will try my best to help. Have a nice day, Eric!


Best regards,
Ji Zhou ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

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

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