DCSIMG

 Subscribe in a reader

November 2007 - Posts - Guy kolbis

November 2007 - Posts

I have been working on creating an Add-In to Visual Studio. One of the things I was trying to do is hooking to several solution related events such as Solution Opened and Solution After Closing.

The solution opened event Occurs immediately after opening a solution or project.

The solution after closing event Occurs immediately closing closing a solution.

You can read more about the events here.

So, while trying to connect to the opened event, I wrote this code:

_applicationObject.Events.SolutionEvents.Opened += new _dispSolutionEvents_OpenedEventHandler(sec_Opened);

This looks fairly simple. The _applicationObject is the DTE2 object that we get in the OnConnection event handler. The problem was that when I opened a solution the event did not fire!

After plaing with it for a while I found out that we need to be careful where and how we declare the event. I solved it by declaring the events as class members. Here is what worked for me:

// Declare the variables at the class scope
private Events2 events;

private SolutionEvents solutionEvents;

// Use it somewhere in code
events = (Events2)_applicationObject.Events;

solutionEvents = events.SolutionEvents;

solutionEvents.Opened += new _dispSolutionEvents_OpenedEventHandler(sec_Opened);

Wow, the Dev Academy is right around the corner. I finally finished working on the presentation and I got all the demos working.

I will be talking about "Performance Analysis". I believe that this is a great presentation that will help us the developers be much more performance oriented.

So, if you want to know how you can improve the performance of your application, you should definitely attend this presentation.

For those of you that would like to hear more, I will be in the Team System panel. 

I am looking forward to seeing you all.

While preparing for the Development Academy, I wanted to add a video clip to my slides. The problem was that the clip was located in YouTube.

I found this link, that will guide you on how to add YouTube clip to your Power Point presentation.

I started a new project that involves creating an Addin for VS 2008.

I created a simple Addin and expected to see it in the AddIn Manager.

However the AddIn Manager did not display my addin.

So, I added a break point at the OnConnection event and lunch the debugger.

The debugger did not stop because it could not load any symblos.

After playing with it for a while I found the issue was the configurations of the AddIn/Macro Security.

You can reach the configuration by going to Tools-->Options-->Environment-->Add-in/Macro Security.

Now I had to add a new addin file path to Visual Studio 2008:

"C:\Users\Guy\Documents\Visual Studio 2008\Addins"

image

That fixed the problem and the Addin Manager displayed my addin.

This is a nice feature for Google that I encountered for the first time...

image

I wanted to search for the word "Framework" but my language selection was Hebrew and instead it turns out to be "כרשצק'םרל".

Google caught my mistake: "Did you mean framework?"

Last week I happened to visit Rishon Le Zion. While visiting there I was looking for a place that sells coffee and has wireless Internet (so I can post a new entry to my blog ). After a short drive I found a coffee place went inside and asked if they have a wireless Internet. As it turned out, Rishon is participating in an experiment where on the main street there are wireless Internet connections that are open for everyone to use.

wireless

This is surely a good news! Well done Rishon!