index > Visual Studio Tools for Office > Difficulties running Word Add-ins with VSTO CTP v3

Difficulties running Word Add-ins with VSTO CTP v3


I have a Windows XP, Word 2007 PC.  On it I have installed Visual Studio.Net, WinFX CTP (Feb.), VSTO, followed by VSTO CTP.

I actually had this setup working a while back (in May), and at the time created a few VSTO Word add-ins that ran perfectly in Word 2007. But now I cannot run any of the add-ins I created previously on this PC.

When I open one of the .sln files, I get this VS error:  "The type initializer for Microsoft.VisualStudio.Tools.Applications.Hosting.VCG threw an exception."

The project does open, but it contains a warning: "Warning: The generated files could not be loaded and have been recreated."

(And there was at one time a project warning regarding WindowsBase.dll but it went away.)

I can build the project with no errors, but when I try to Debug and it runs Word 2007, it is not stopping at my breakpoint for ThisApplication_Startup. And Word starts but it shows an error captioned Office Document Customization is Not Available, with detail:
Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications.Contract, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Since getting these errors, I uninstalled Windows Foundation (it made me to this in oder to reinstall WinFX), reinstalled WinFX CTP Feb., repaired VSTO Runtime, uninstalled/reinstalled VSTO entirely, and finally reinstalled the VSTO CTP v3.  And I'm back to the same errors.

Please help!

Thanks

Karen

kewpg

Can you create, run and debug new add-ins?

Thanks, Richard.

Richard Cook - MSFT
Also, did you install or uninstall anything on the machine between May and now?
Richard Cook - MSFT

Hi,

any news on this one? I deinstalled VSTO CTP v3 with all the sample addins available for that release.

I installed VSTO 2005 SE and now I get the same error message:

"The type initializer for 'Microsoft.VisualStudio.Tools.Applications.Hosting.VCG' threw an exception"

I repaired the original VSTO package from VS2005 and VSTO 2005 SE but the error is the same.

Any help would be greatly appreciated.

--
SvenC

SvenC

I will attempt to reproduce this failure.

I didn't receive any response to my initial question regarding creating and running new customizations. Perhaps you might be able to answer instead.

Thanks, Richard.

Richard Cook - MSFT

Unfortunately, we don't support any scenarios involving the VSTO CTP release. When installing VSTO 2005 SE this must be done on a clean machine that has not had the CTP release installed on it previously. In order to do this, you will need to reimage your machine. Sorry for the inconvenience that this may cause you.

If you still experience this issue with a clean VSTO 2005 SE install, please let me know immediately and I will investigate further.

Best regards, Richard.

Richard Cook - MSFT

Thank you for your suggestions. Everything is working for the most part now that I have VSTO SE installed on my Word 2007 PC. However, while I can create Word 2007 Add-ins, I see no way to create Word 2007 document and template projects (it still wants to use Word 2003 for these, but Word 2003 is no longer on my machine). I have posted a new thread about this since it is a different topic.

Karen

kewpcg
reply 7

You can use google to search for other answers

 

More Articles

Daily wise resource allocation in MS Project
VSTA: How to handle non-public object which is not in the host
Why can I not call FindControl on a toolbar object
strange error in excel
MS Access opening exclusivly
Printing on a server without Office installed
Office - Sharepoint Integration
VSTO errors
Formula question: What does $A$2 mean?
Merging WordXML into Bookmarks
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

How to add vsto in visual studio 2005 pr…
Visual Studio Tools for Office
HHC6003: Error: The file Itircl.dll has …
Looking for makecert.exe download
Does the Tools for Office edition still …
How to get the Excel dialog that allows …
Still in need for help...
Problem regarding the add ins for outlook
Add-in not load in Word when running wit…
when an Excel file is Opened it takes mo…
Error opening an excel file with cached …
DataBindings with Outlook Item UserPrope…
Microsoft.Sample.Outlook.Utility
How To View InfoPath Form
Fetching contacts from Global Address Li…

Hot Articles

Detaching outlook attachments
Batch Printing of word document on Serve…
Problem while adding xml nodes to a word…
how to add xml markup to a range
What do I need?
I cannot get Add-in object instance in O…
Getting Memory Erros with Add-In
Excel 2007 file saving
Binding Pictures/Images in Word Documents
Adding dynamic menus and events in Outlook
Range.InsertParagraphBefore avoiding the…
Weird installing error...
VS2005 errors after upgrade from VSTO v3…
word document revisions
How to empty "From" field usin…

Recommend Articles

Call VSTO Addin functions from external …
Smart Tags and Stock Quotes
problem with Replacement in word documen…
MailItem Properties
DllUnregisterServer issue; err code 0x80…
Listing PackagePart items inside a Word …
Get Reference to the Excel Worksheet fro…
Adding controls at runtime resulting error
Access Runtime
C# Application object
Urgent Deployment problem
ItemsEvents_ItemRemoveEventHandler
VSTO update database
set document path in word saveas dialog
Add-In won't run with .net 2.0