Derik Whittaker

Syndication

News


Code Contracts tab in VS2012 – Odd way to get it enabled

I am a huge fan of the Code Contracts library which is now part of .net, in fact when I setup a new instance of VS it is one of the first plugins I install by default.  However, I was having some issues because even though I had installed the .msi I was not able to get the settings tab to show up in VS2012, in fact it was not in VS2010 either.  This was a bit odd to me because I had never had this issue.

In order to try to resolve this I decided I should uninstall the .msi and re-install it, so I set out to do this.  However, after doing this I still did not have the tab in either IDE, now I was perplexed.  Of course the first thing I did was to go out and search for the solution for this issue but nothing really popped out as ‘this is how to fix this issue’, however a few people did mention that they had to do a VS Repair install.  I thought this to be a bit extreme so I was not too keen to give this a try.

However, as fate would have it I was kinda forced to do a Repair a few hours after tabling my efforts to get the tab to show in the IDE (I had some really odd VSMon debugger attachment issues and the error dialog actually suggested I do a repair).  Given that I had 2 different issues both suggesting I do a repair install I figured WTF might as well do it.

Long story short, I did the repair install and BOTH my issues were resolved.  I had the tab in the IDE and my VSMon debugger issues were gone.  Now I don’t know if the issues were related or if it was just a really good coincidence but either way my issues were resolved.

So if you find yourself unable to get the Code Contracts tab showing in your IDE after installed the .msi try doing a VS repair install and see if that does the trick.

Till next time,

P.S. I have both VS2010 and VS2012 on my box and I installed VS2012 first.  This may have caused some of the issues, not sure.


Posted 09-07-2012 5:38 AM by Derik Whittaker

[Advertisement]

Comments

Steve Evans wrote re: Code Contracts tab in VS2012 – Odd way to get it enabled
on 09-07-2012 7:38 AM

Keep in mind that 2012 installs .NET 4.5 which overwrites the binaries for .NET 4. So it could have been highly likely that something got very screwed up if installing 2010 changed things around.

Andrey wrote re: Code Contracts tab in VS2012 – Odd way to get it enabled
on 09-07-2012 8:59 AM

Easy way:

1) Install VS2012

2) Install latest Code Contracts

3) Open Developer Command Line as Admin and execute devenv /setup

4) Wait till it's over and enjoy. :) (at least it's works for me)

jdn wrote re: Code Contracts tab in VS2012 – Odd way to get it enabled
on 09-07-2012 3:59 PM

I had to do the devenv /setup thing.  I have VS 2010 shell installed (SQL Server Management Studio in SQL 2012 uses it, I think), but it was installed before VS 2012.

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)