Pages

Tuesday, August 27, 2013

Visual Studio 2012 Photo Start Page

VSStartPage
Quick download link for those who don't want to scroll: 
https://visualstudiogallery.msdn.microsoft.com/a012051a-9bd8-4103-9c51-fd0738752d50

So 2 years ago (or so) I created a Photo Start Page for Visual Studio 2010. There was no reason for it really. I saw that someone else out there had made something similar (I’ll post a link to it if I can find it) and I decided I wanted to make a start page that would show Bing’s daily image. So, that’s what I did, starting with the excellent blog post by Adrian Collier

http://blogs.msdn.com/b/visualstudio/archive/2010/07/29/walkthrough-creating-a-custom-start-page-part-1.aspx

as a guide. If you are running Visual Studio 2010 and would like to try out the Visual Studio 2010 Photo Start Page, you can find it here:

http://visualstudiogallery.msdn.microsoft.com/7f51fe49-d725-419b-8eff-bca084e64c54

Enter Visual Studio 2012. VS 2012 is an awesome upgrade from 2010 and since I have been using it I’ve had a hard time going back to older versions when I have to boot up a VM older than a year. But… the old Start Page no longer works. No big deal, even thought I lost the old project code, I was able to recreate the project pretty quickly using the start page project template for VS 2010 found here:

http://visualstudiogallery.msdn.microsoft.com/f655a5dc-1a2d-4eca-b774-76c352c03b87

and then upgrading the project for 2012 using the instructions found here:

http://msdn.microsoft.com/en-us/library/vstudio/jj991932.aspx

One note about the upgrade instructions… I ran into an issue with the GetDTE method in the Utilities class. I had to update it to the following in order to get everything to work:

public static DTE2 GetDTE(object dataContext)
{
    DataSource source = dataContext as DataSource;
    foreach (IPropertyDescription property in source.Properties)
    {
        if (property.Name == "DTE")
        {
            return source.GetValue("DTE") as DTE2;
        }
    }
    return null;
}

I’m not sure if it is the Service Packs I have installed for VS 2012, or what may be the cause, but this was the work around.

Anyway, I have created a new Visual Studio 2012 Photo Start Page project on CodePlex. If you would like to use the project as a starting point for your start page, please feel free.

vs2012photostartpage.codeplex.com

Also, I’d appreciate any feedback surrounding the project or the Start Page itself.

Finally, if you don’t want to mess with the project, and you just want to install the extension, either visit the extension project page here:

https://visualstudiogallery.msdn.microsoft.com/a012051a-9bd8-4103-9c51-fd0738752d50

or just open the Extensions and Updates manager:

Capture1

and search Online for “Photo Start Page”

Capture2

When you find it, select “Download” and follow all of the prompts to install the extension. Once it installs, you will need to restart Visual Studio, and then go to the Tools –> Options menu and select the “Startup” configuration options.

Capture3

Select the “Visual Studio 2012 Photo Start Page” from the “Customize Start Page” drop down list, select OK, and you are good to go!

1 comment:

  1. Im have problem hith same class descript GetDte or source.Properties with VS 2015, any help?

    ReplyDelete