-
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...
-
Q : The VSTA IDE keeps hanging up while debugging when I try to step into code. Why is it doing this? A : The IDE may be hanging because you have left PDB files in your application directory. Even if you are running the Release version, make sure that you have no PDB files in the same directory as your...
-
My integration journey is taking some exciting turns. As always, I would encourage you to read the first three posts in this series ( Chapter One , Chapter Two , and Chapter Three ) before reading this one. I have finally integrated the VSTA IDE into my Contact Manager program. I am going to go through...
-
Q : I have a problem with loading VB add-ins. The method call: ObjectModel::Collection<AddInToken^>^ addInToken = AddInStore::FindAddIn(IEntryPoint::typeid, AddInStoreExtensions::DefaultPipelinePath, FilePath, TypeName); returns an empty collection when called on a dll created using VB. The FilePath...
-
In this sample, Melody modified the proxy to include an entry point for the CDocDrawing class (the CDocDrawing class was also modified to include events which become disassociated with ProxyGen- see this blog for related info on this bug ) and the HostItemProvider to expose the CDocDrawing type. Melody...
-
Here is the second chapter in my integration journey. If you have not looked at the first blog post , it would be a good idea to look there first, because that post will explain the application I am working with and my idea behind it. First, let’s look at a few things that have changed since my...
-
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...
-
Q : When working with a COM host, such as the ShapeAppMFC sample included in the SDK, ProxyGen creates descriptor and proxy files which do not expose events due to the inheritance structure. Three types are generated for a class: the classType, IClassType, and _IClassTypeEvents. The classType implements...
-
Q : Would it be possible for me to create a Custom Editor using VSPackage and then use it with VSTA? A : >> Would it be possible for me to create a Custom Editor using VSPackage Yes. >>and then use it with VSTA? No. However, you should be able to create ToolWindows in VSTA using an In-Process...
-
Q : After I installed VSTA and some language packs I changed the language by modifying “HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSTAHost\<hostid>\8.0\General\UILanguage.” However, when I ran VSTA and it configured the environment for first time use, the language changed back to English...
-
Q : Is it possible to show users a VSTA IDE window but prevent them from editing the code? A : It may be possible to do this by calling IVsTextBuffer.SetStateFlags() with BUFFERSTATEFLAGS.BSF_USER_READONLY. If that doesn’t work, you could try creating a readonly line marker that encompasses the...
-
Q : I was wondering how to integrate custom help files into VSTA. So far, pressing F1 shows some general help about VSTA, but nothing that will help my customers to write macros. A : VSTA and Visual Studio use Microsoft Help 2. HelpStudio Lite is the tool in the Visual Studio SDK that you use to author...
-
A useful function the DTE has a built in is to prompt the user to save any unsaved files. It is a good idea to make this call in when shutting down the DTE, for example in the disconnect method of the VstaDesignTimeIntegration class. EnvDTE. vsPromptResult promptResult = this .dte.ItemOperations.PromptToSave;...
-
When an event will be fired many times it is a good practice to do periodic garbage collection. When a VSTA add-in hooks into an event which is fired many times this becomes even more important because the memory usage for the host process will grow very high without periodic garbage collection. The...