Visual Studio 11 crashes with InvalidCastException

UPDATE:Ā This issue can be solved by running the steps described here. There’s also a Microsoft Connect ticket describing the problem.

Just got Visual Studio 11 beta (with recent VS March Update) to crash consistently on start-up:

Launch VS, immediate crash:

Debugging that brings up the following exception:

The exception detail reads:

System.InvalidCastException was unhandled
HResult=-2147467262
Message=Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘Microsoft.VisualStudio.OLE.Interop.IServiceProvider’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{6D5140C1-7436-11CE-8034-00AA006009FA}’ failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Source=mscorlib
StackTrace:
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.VisualStudio.OLE.Interop.IServiceProvider.QueryService(Guid& guidService, Guid& riid, IntPtr& ppvObject)
at Microsoft.VisualStudio.Shell.ServiceProvider.QueryService(Guid guid, Type serviceType, Object& service)
at Microsoft.VisualStudio.Shell.ServiceProvider.QueryService(Type serviceType, Object& service)
at Microsoft.VisualStudio.Shell.ThreadHelper.get_Invoker()
at Microsoft.VisualStudio.Shell.ThreadHelper.InvokeOnUIThread(InvokableBase invokable)
at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke(Action action)
at Microsoft.VisualStudio.Services.TaskSchedulerService.VsUIThreadScheduler.<>c__DisplayClass2.<QueueTask>b__0(Object _)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
InnerException:

How did I get in this state? I’m unsure, but I think I accidentally hit F1 key. (Oh noes, the dreaded Visual Studio F1 key!) Somehow, I think that wired up the VS help, which resulted in a consistent crash at boot.

Running devenv.exe /resetskippkgs didn’t fix it. Running a full VS repair doesn’t fix it.

Anyone else hitting this issue?

5:01 developers are visionless hacks

The 501 ManifestoĀ states that:

  • Our familiesĀ are more important than the commercial goals of business owners
  • Free timeĀ is more important than free snacks
  • Living our livesĀ is more important than maintaining ourĀ personal brands
  • Sustainable paceĀ is more important than muscle-man heroics
  • OurĀ personal creative projectsĀ are more important than commercial products the world doesn’t need
  • HavingĀ money for nice clothesĀ is more important than getting free t-shirts from Microsoft
  • Playing fuƟballĀ in the pub with our friendsĀ is more important than playing fuƟball in the office with our team leader
  • Not being a dickĀ is more important than being a rockstar

“501” refers to programmers who punch out at 5:01pm and never think about technology until 9am the next morning. They don’t read programming blogs or books, nor do they have a desire to advance their craft. Technology is nothing special to them, software is just another job. They might as well be bagging groceries if the pay was comparable.

There’s some good to beĀ gleanedĀ from this manifesto. If your software job is all you do, your life will pass you by and you’ll wonder why you spent so much of your life living for a corporation. You’ll realize what a waste of a life it is to make all that money but not, you know, live. The young & ambitious tend to overlook this wisdom.

Having a life outside of tech is important and rewarding. For me, I play music, I help run a religious congregation, I spend time with my kids and my wife. Those things are hugely rewarding.

I sympathize with the 501 manifesto, but there’s something not quite right here.

The manifesto confuses corporate interference into personal life with passion for technology. That is to say, it incorrectly implies the people who are passionate about technology are those enslaved to their corporate masters. It makes this confusion when it says those who “write technical blogs, attend user groups, or contribute to open source projects” are those who are enslaved by their corporate masters.

It’s silly, because my corporation didn’t ask me to write this blog, attend Code Camp last week, go to user groups, or contribute to open source projects. In fact, many corporations frown on such things, since it takes time away from working on The Project. My corporate masters didn’t ask me to do those things, nor did I do those things in order to impress my corporate masters.

Instead, I do these things because I love technology. And I suspect those of you who do these things do so because, like me, you’re passionate about software and technology, not because some evil corporation forced your hand.

I entered technology because it’s my passion. I take joy in writing software, and in a bigger sense, I consider technology a frontier for humanity and the advancer of civilization. More on that in a minute.

If you entered the technology field for other reasons like money or easy labor, I suggest finding a career you are passionate about. It’s hard to put a price on happiness, and if you aren’t happy with your choice of career, get out before you waste any more of your life on it.

Why be passionate about technology?

I find it freakin’ awesome that we can make new things.Ā We’re in a new age, an age of technology, and we’re the inventors at the fore. We build things from scratch! Then put those new things in front of people. And some of those things might be so useful, that people will use those things regularly. What a rare and precious opportunity we have, that we can build and invent new things, things that can impact humanity.

Hubris? Not at all:

We explore the universe because of technology.

We fix sick people because of technology.

We can communicate with anyone in the world via the push of a button because of technology.

We prevent disease because of technology.

We have the sum total of humanity’s knowledge in a single repository — the internet — because of technology. That we have a single repository containing the sum of human knowledge for the first time in our history is an accomplishment in itself, but just wait until you see the ramifications of this knowledge freely available to all. It will result in an explosion of learning, new technology, new ideas; raw civilization advancement.

I want to be part of that. It’s why I have a passion for technology. It’s why I don’t consider software, the brains behind technology, just another job. I don’t stop thinking about it at 5:01pm. Technology is a frontierĀ for humanity. And I’m going to add to it, even if through some insignificantly small contribution.

Shortsighted and visionless is the person who looks at software as just another job, technology as just another field. If that’s you, find a job you take joy in, and in a field you are passionate about. Your life will be happier.

For the rest of us, the 21st century is a great time to be alive. We, the technologists, are the new inventors. We are the future, and the future, my friends, is bright. Watch and see.

Nerds, Code Camps, and You

Summary: Reflections on Twin Cities Code Camp 12, and my talk on the death of Silverlight and the triumph of HTML5. Why code camps and developer user groups are great for the happiness and careers of all who love technology.

This past weekend marked the 3rd Twin Cities Code Camp conference I’ve attended. Each year gets better.

Why are code camps so great?

You get to hang with nerdy people. That’s me in the blue shirt:portrait of me and another nerd at Code Camp

…You get to talk nerd crap with other nerds:

Cats (both LOL and Nyan variety)? Llamas? Star Wars? Sailor Moon? The nerdliness abounds:

…You get to give fun/silly talks. I spent a good 30 minutes talking serious about the death of web plugins and the triumph of HTML5, but ended with a from-scratch demo building an HTML5 radio station that played…llama music. Oh yes!


I rocked that talk hard, and had a blast doing so:

Move Your Silverlight Skills to the Native Web with KnockoutJS [slideshare id=12574854&w=425&h=355&sc=no]

View more PowerPoint from JudahGabriel

Doesn’t hurt to hear great feedback:


Oh yeah!

Code Camps are total nerd fests, and it’s a blast. You learn tech, you grow your career, you have fun.

If you’re a dev who loves software and technology, step outside your job and have some fun with technology. Try a Code Camp, or even just a local user group. Self-improve and have fun while doing it.Ā Good for career, good for life happiness.