?
Solved

Visual Studio .NET Office Add-in deployment problem

Posted on 2003-02-21
7
Medium Priority
?
436 Views
Last Modified: 2008-02-20
Group - please help...

I have created a Visual Studio.NET Office Add-in.  I created a new project, Extensibility Project --> Office Addin.  The Solution that was created for me contained two projects;  one for the actual code and one for deployment.  

I've add a reference to the Excel 9.0 object library, and I casted the applicationObject to an Excel.Application as follows:

public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom)  {    

   applicationObject = (Excel.Application)application;
               addInInstance = addInInst;

    if (connectMode !=
        Extensibility.ext_ConnectMode.ext_cm_Startup) {
        OnStartupComplete(ref custom);
    }
}

The application works fine on my machine (when I run in debug).  The Build for the entire solution completes with no errors or warnings.  BUT, when I try and run the .msi file to install the ADDIN on another PC, The addin NEVER shows up!  (A new Menu button is expected to appear in the Tools Menu of Excel).

I've spent all day looking at this, moving files around, moving the Interop.Excel.dll and Interop.Office.dll into the Office directory, etc, and still cant get the Addin to install.  Am i missing something?!?  Any help would be greatly appreciated.

Im using VS.NET professional, Win 2000, Office 2000.  And trying to install on a Win 2000, Office 2000 machine.
0
Comment
Question by:asdf103100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 

Expert Comment

by:doubl00
ID: 7997294
I can think of two posibilities:  

Is the .NET framework on the target machine?

Since the assembly is (probably) not digitally signed, is the macro security setting set to medium or low and do you have "Trust all installed add-ins and templates" checked?



0
 

Author Comment

by:asdf103100
ID: 7999080
The .Net framework is installed on the target machine.

The macro security settings are set to medium, and the "trust all installed add-ins and templates" button is checked.

My guess is that the .NET deployment package is missing something that I need to add manually.  A registry setting, a reference, something, but I dont know what it is.
0
 

Expert Comment

by:doubl00
ID: 8022638
After an exhaustive search, I though I found your answer, but I see you are using Excel 9.0 (2000) and not Wxcel 10.0 (XP).  So I won't belabor the point.  

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp

The link above describes deploying the Office XP primary interop assesmblies on the target machine.  Maybe this will help someone else.  Don't know if thiere is a similar issue with Excel 2000.  I use XP.  

Sorry,

don
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Expert Comment

by:doubl00
ID: 8022850
Is the assembly named with a strong name, registered as a COM object, and installed in GAC?

The following article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp?frame=true

describes deploying a .NET assembly (athough it is VB.NET) to a COM enabled component.  (See "Create key pair and sign the assembly")  

I have performed these steps manually using:

sn.exe
regasm.exe
and
gacutil.exe

I browsed for the strong name caption in the Common properties of the project prpery pages but did not see it.  Should not be different for VB with a common IDE????

I would have hoped that the IDE performs these steps for you bu maybe not.  Installation in the GAC requires the strong name and that may not be implemented.  The COM may funciton on your machaine because the files are in the poject directory.  But (maybe) needs to be in GAC to function on the target machine.  

Hope you get it.  

don
0
 

Author Comment

by:asdf103100
ID: 8042289
Allow myself to answer....myself.

Thanks for all the posts.  I spent some time looking around, trying different things, and I was still no where.  I bit-the-bullet and called MS technical support.  It took the MS support guy a few days to dial in the problem, but we finally figured out what it was.  

I had added to C# class files to my project, and one of them had a constructor that looked like the following:

public clsExcel(Excel.Application ExcelApp)
{
  m_ExcelApp = ExcelApp;
}

Nothing technically wrong with this constructor.  (I had declared m_ExcelApp as a public Excel.Application object).  However, for some reason, when the application was deployed, this constructor would cause big problems.  Essentially, what I was told from the MS Tech guy was that there was an order of operations issue.  We were essentially referencing an object that out installer hadnt registered yet.  

If we changed the constructor to:

public clsExcel(object ExcelApp)
{
  m_ExcelApp = (Excel.Application)ExcelApp;
}

the application deployed perfectly.  Thanks MS Tech Support!
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11698614
PAQed, with points refunded (200)

modulo
Community Support Moderator
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question