Browse by Tags

  • IPC Port Error

    Q : What do you know about this error? It happens sometimes after clicking “Start Debuging” triangle button on VSTA IDE window. A : Add InitializeLifetimeService() method to the class that implements IExternalDebugHost as shown below. == ShapeAppMacroRecordingCSharp...
    Filed under: , , ,
  • dllexport in C#

    Because C# does not provide a dllexport equivalent, you'll need to add a CPP shim into the mix that can get an instance of the managed class from the CLR. Here's the quick walkthrough: 1. Add a cpp library to the VSTA integration solution 2. Reference...
    Filed under: , , , ,
  • Intercept DTE Commands in C#

    Here's some sample C# code showing how to intercept DTE commands. _dispCommandEvents_BeforeExecuteEventHandler has a parameter that allows you to cancel execution of the command if that is what you want to do. private EnvDTE. CommandEvents mCommandNewProject;...
    Filed under: ,
  • Migrating a VB template to C#

    Q : How do I migrate my VB template to C#? Do you have sort of a template for making a template? I'm using VSTA version 1. A : The best thing to do would be to take a look at the ShapeAppCSharp sample templates included with the SDK. You can base...
    Filed under: , , ,
  • C++/COM/C# Sample

    Please try this C++/COM/C# sample for VSTA 2.0 on how to: --load/unload different macro addins/projects --'show macros' whether the assembly is loaded in memory or not (ReflectionOnly). Sample demonstrates: 1. 'Load VCF' loading and unloading...
    Filed under: , , , ,
  • C# Startup and Shutdown hookup

    VB and C# hook into events very differently. A VB template can use “ Handles Me .Startup” and “ Handles Me .Shutdown” in the AppAddIn.vb file to hookup the events. C# requires this code to be explicitly executed, so you’ll...
    Filed under: , ,
  • Translating a template from VB to C#.

    Q : I'm having trouble actually creating a new add-in project using the template. I have the several files that make up the template. I took the .vstemplate file from the VB version and edited it to match the file names of the C# edition. I stuck...
    Filed under: , , , ,
Copyright Summit Software Company, 2008. All rights reserved.