My integration journey has come to an end. For my last post, I am going to write about a new way of loading VSTA AddIns: MEF. I have talked about MEF some in my previous posts , and have successfully used both VSTA and MEF together before. This time, I have successfully used MEF to load VSTA AddIns....
This is one of my last posts in this series. If you have not yet read my previous posts, here are the links to them: Chapter One , Chapter Two , Chapter Three , Chapter Four . (I would especially read Chapter Three, as that is where I introduce MEF, and I would also read the MEF Overview and the Programming...
Here is Microsoft’s workaround for the problem hang-ups during in-process debugging: “The idea is that we want to wait for the type –registering threads to finish before we call addin.FinishInitialization. What I did is to record the number of threads in the process before we activate...
Within a VSTA project there is a Host Item Node. This displays in the Project Explorer as a subfolder within the VSTA project and contains the main code file as well as any DPM files. By default the folder's name is the HostID and the icon is the open or closed folder icon. These settings can be...
To avoid losing an event hook-up from a COM source it is necessary to hold a local reference to the source of the event to avoid unwanted garbage collection. This is a concern for VSTA hosts hooking into DTE events as well as VSTA add-ins which use a direct reference to a COM host instead of a proxy...
We have new downloads up including templates and a new tool AutoProxyGen which automates ProxyGen and can be used in build events. AutoProxyGen : This tool automates the process of using ProxyGen and can be used as a build event. AutoProxyGen includes workarounds for ProxyGen bugs including automatically...
To remove or "unregister" project templates: The easiest way to remove or "unregister" project templates which are registered with a host is to use the vsta and devenv setup commands. These commands get the VSTA project templates location and the Visual Studio project templates locations specified in...
Overview: During development, changes may need to be made to the proxy. Anytime the proxy is changed its assembly needs to be re-installed in the GAC. Failing to do this will result in the last version installed in the GAC to be used by VSTA and the error "The following module was built either with optimizations...
Overview: Finding DLL’s programmatically can be challenging if they are not well organized. For VSTA integration several DLL’s may need to be found including add-in’s to load. In the ShapeApp samples included with the SDK, the add-in samples copy their DLL’s into the folders %MyDocuments%\%HostID%\AppAddins...