I’ve been doing a bit of Web UI work recently and everything was going fairly smooth until yesterday when I tried opening one of my CSS files in Visual Studio and was promptly greeted with a dialog reading “The operation could not be completed. Unspecified error” and the editor never opened. A little hunting for the error message and “CSS editor” revealed that the Web Standards Update for Microsoft Visual Studio 2010 SP1 was likely to be the culprit and uninstalling should resolve the issue.
I closed Visual Studio, uninstalled the update, and sure enough, when I reopened my project the CSS file opened just fine. I haven’t reinstalled the update yet. Maybe I’ll try again soon but it seems from the comments on the component’s page that this is a common issue.
Today I was trying to run the code for a project I’ve just been assigned to. I’d brought down the code from SVN, built the common libraries, and punched F5. Build succeeded. Before long the browser loaded and the beautiful new UI stared back and virtually begged me to start clicking around. Before I could do anything though Visual Studio rudely interrupted with an unhandled exception dialog. This one looked nasty, particularly since I’d never seen it before: System.Security.VerificationException – Operation could destabilize the runtime…
I found a Stack Overflowquestion about this that pointed to Json.NET as a possible culprit. Sure enough, the source of the exception was Newtonsoft.Json. It seems that Visual Studio Ultimate’s IntelliTrace didn’t like something Json.NET was doing and would throw that exception. The issue is said to be resolved as of release 6 but I haven’t upgraded the assembly yet.
For the time being I’ve added a rule to exclude *Newtonsoft.* from the IntelliTrace modules list as recommended by in the Stack Overflow answer. Since excluding the assembly I haven’t seen the problem again.
When I first saw the box selection capabilities in Visual Studio 2010 I thought “that’s kind of neat but I’ll probably never use it” and promptly moved on. I couldn’t have been more mistaken. In fact, nearly two years later, box selection has become one of those features that I use almost daily. What surprises me now though is how many developers I run into that still don’t know about them.
Box selections let us quickly make the same change to multiple lines simultaneously. Creating them is easy – just hold shift+alt and use the arrow keys or hold the alt key while left drag the mouse to define a rectangle. If you just want to insert the same text onto multiple lines you can define a zero-length box by expanding the box vertically in either direction.
So what makes box selections so useful? Some of the things I find them most useful for are changing modifiers and making local variables implicitly typed. To illustrate, let’s take a look at a few non-virtual properties that we’d like to make virtual.
Making these properties virtual without a box selection certainly isn’t difficult but it’s definitely tedious. A box selection lets us make them all virtual at the same time so we can get on with the task at hand. The thin blue line immediately following the public modifier on each property identifies the zero-length box that serves as the point where we’ll insert in the virtual modifier.
To insert the virtual modifier we just need to type (or paste) “virtual.” Here you can see that each property is now virtual and the zero-length box has moved to the end of the inserted text. What if we decide later though that these properties shouldn’t be virtual after all?
We can use box selections to remove the virtual modifier from each property just as easily. In the example to the left we see a box selection highlighting the virtual modifier on each line. To remove the text we can simply delete it. This will leave us with a zero-length box where the virtual modifiers used to be. We can then simply click or arrow away to clear the box selection.
Box selections can go a long way toward increasing your productivity by reducing some of the more tedious aspects of programming. The few seconds they save here and there can really add up over the course of a day. More importantly though, that time can be spent on the real problems we’re trying to solve.
My team has been working on some new functionality that’s really configuration heavy. One of the challenges we’ve been facing with this project is managing all of the changes to the central configuration file. In an attempt to add some order to the chaos we decided to start with a base file and apply a series of XSLT sheets to it so we can ensure a consistent state. I haven’t worked with XSLT in years so aside from relearning the language, one of the first things I did was start looking for a tool that could help me build and test my new sheet.
I’ll be presenting Web performance and load testing in Visual Studio 2010 to the Indy TFS user group on October 5, 2011. In this talk we’ll explore some of the basic test management capabilities in Visual Studio 2010 before diving in to building and executing both Web performance and load tests. Some areas we’ll examine include:
Test recording tests
Load test scenarios
500 East 96th St
Indianapolis, IN 46240
Doors open at 5:30 PM with the meeting starting at 6:00. Pizza and drinks will be provided.
I really debated with myself about writing this post but after an exchange with a friend I decided to go ahead with it. My team recently upgraded to new laptops with a fresh new image. When one of my friends remarked that he was glad that the new image contained wingrep I asked why he didn’t just use Visual Studio’s Find in Files feature. His reason? He didn’t know about some of its features. After talking about it a bit he said he’d give it another shot. Now, several days later he’s using it almost exclusively.
Visual Studio Magazine is reporting that Microsoft has released Visual Studio SP1 and it is now available for download. Among other things the service pack addresses issues with general stability, the editor, the shell, and IntelliTrace. It also improves support for 64-bit environments, Silverlight 4, IIS Express and a variety other areas. A full description of the service pack is available from Microsoft Support.