Visual Studio .NET Office Add-in deployment problem

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.
asdf103100Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
moduloConnect With a Mentor Commented:
PAQed, with points refunded (200)

modulo
Community Support Moderator
0
 
doubl00Commented:
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
 
asdf103100Author Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
doubl00Commented:
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
 
doubl00Commented:
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
 
asdf103100Author Commented:
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
All Courses

From novice to tech pro — start learning today.