kewpcg

I have created my first setup project for a VSTO add-in for Word 2007. In testing the final MSI, I am unable to complete the installation - it fails with the message:

"Exception occurred while initializing the installation:

System.IO.FileNotFoundException: Could not load file or assembly

'file:///C:\WINDOWS\system32\Files\[company]' or one of its dependencies. The system cannot find the file specified."

Where [company] is the first word of my company's name (Note: The full company name is being used for the Manufacturer property in the setup project).

There are a couple of COM DLLs being installed by my setup project, and both are set to self-register. The only thing I can come up with is that some wires are getting crossed somewhere in this process - either they are not registering, or one of them needed to be registered before the other one and that didn't happen.

Does anyone have any clue as to what is happening here Why is the first word of my company's name in this path (C:\WINDOWS\system32\Files\) I have not made any reference to this location in my setup project, so I have not idea where this is coming from or what this error means.

Thanks.



Re: Visual Studio Tools for Office Problem with VSTO Setup project

Neil Weber

Do you have any custom actions In particular, are you using the SetSecurity sample custom action. It tries to load the assembly.

When installing your MSI, use msiexec and enable logging using the "/log" command line parameter. I've found this log helpful.




Re: Visual Studio Tools for Office Problem with VSTO Setup project

kewpcg

Thanks very much - your suggestion led me to the problem. I removed the CustomAction and then the MSI installed successfully. Then I added it back from scratch and everything seemed to work fine.