Wednesday, 28 March 2012

How to get IntelliTrace in production for Windows Applications in Visual Studio 11

As we saw in the last post, we can get IntelliTrace logs from web applications.

But this is possible for Windows Applications, too!

Locate the IntelliTrace application under C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\11.0.0.

Then launch it, with the following syntax:

intellitrace.exe launch /cp:<CollectionPlanPath> /f:<LogFilePath> <ExecutablePath>

That’s all, we finished Smile

After that the itrace file is analysable as usual.

Saturday, 24 March 2012

How to get IntelliTrace in production for Web Applications with Visual Studio 11

Until yesterday, IntelliTrace in production environment was not supported, so the usefulness of it was a bit argued.

But now with Visual Studio 11, we can collect IntelliTrace logs from production environment in a completely supported way! And moreover, if you ask the Microsoft CSS (Customer Support Service) for help, the first question would be: “May you send me the IntelliTrace log please?”

Before of configuring IntelliTrace logs collection, we have to set security for the IIS Application pool account:

icacls sitepathIIS APPPOOL\<AppPool Account>”:(F)

image

Then, hands on the bits. Suppose we have a web application throwing an exception.

Firstly, we have to deploy IntelliTrace to the target environment. Pretty easy, just extract content from the IntelliTraceCollection.cab file you can find under the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\IntelliTrace\11.0.0 path.

Then we have to extract it to the target server. I suggest using the expand command from a command prompt:

expand.exe /f:* IntelliTraceCollection.cab path

Lastly, bring up PowerShell:

image

We have to load the IntelliTrace PowerShell Module:

Import-Module sitepath\Microsoft.VisualStudio.IntelliTrace.PowerShell.dll

After doing so, we can get the full list of commands we can use:

Get-Command *IntelliTrace*

image

And now we collect logs about the target application:

Start-IntelliTraceCollection ApplicationPool CollectionPath OutputPath

CollectionPath is the path we chose for IntelliTrace. In there, there are two “profiles”: collection_plan.ASP.NET.default.xml which collects only IntelliTrace events, and collection_plan.ASP.NET.trace.xml, which traces also function calls and events.

OutputPath is where we store logs.

image

After deciding Yes (to all Smile) we have to run the application.

When we got the error, we have to snapshot the log file:

Checkpoint-IntelliTraceCollection ApplicationPool

image

And then we have to stop collecting it.

Stop-IntelliTraceCollection ApplicationPool

image

That’s all: we have the logs.

To analyse them, it’s just a classic IntelliTrace analysis as we always did.

Tuesday, 20 March 2012

Code Review in Visual Studio ALM 11

Code Review is one of the new features in Visual Studio ALM 11 focused on collaboration among team members.

Everything starts with a request for review: you can add as much reviewers as you want.

tr0

Then after submitting the request, a work item is opened on behalf of me for the reviewer(s).

The reviewer can see there’s an incoming activity:

tr1

Opening it the Team Explorer shows up all the information needed.

tr2

Clicking on the code file affected by the review brings up the new diffmerge (we’ll see some insights about it in a later post).

tr3

I obviously can add a comment on my review…

tr5

…and define how did I valued the content:

TR6

After sending the completed review, the requestor has a complete overview of what did the reviewer do.

tr7

Mostly important: now Code Review is not an external process, but completely merged into the ALM in a seamless way.

Thursday, 15 March 2012

Continuous Test Runner

Continuous Testing means running unit tests after each build in an automated way.

In the new Team Explorer, we have this functionality built-in.

To enable it, the only needed task is to check the Run Tests After Build flag under the Unit Test Settings menu:

image

That’s it, now everytime we hit CTRL+SHIFT+B our test suite is going to be run again.

Monday, 12 March 2012

What’s happened to Test Impact Analysis?

If you remember Visual Studio 2010 (Smile) there was a nice feature called Test Impact Analysis. It used to analyse your test suite and provide a report of what’s being touched.

In Visual Studio 11 this feature is no more available in the IDE, but it’s inside the Team Build, and enabled by default.

If you go through the Build Definition settings, and you look at the Process Template for the build, you can see the Test Impact Analysis is still there:

image

And it’s enabled by default Smile

Friday, 9 March 2012

Licensing changes for Team Foundation Server

Mr. Brian Harry informs us that Team Explorer Everywhere, the cross-platform solution to access Team Foundation Server from Eclipse-based IDEs, running on Windows, Mac OSX, Linux, and different flavours of Unix is now free of charge!

So now it’s exactly as the Team Explorer. This change is for the 2010 SP1 version too.

Then: no more CAL required to access Team Foundation Server’s reports!

Latest: integrating System Center Operations Manager 2012 with Team Foundation Server, who does SCOM operations will no more need a CAL.

The Brian’s post is here.

Have a nice day Smile

Thursday, 8 March 2012

Code Clone Analysis: a quality enhancer in day by day use

A huge problem we have in team development is code recycling.

Sometimes it may be good, recycling some factory-like code we previously created to be reusable, but most of the times it’s a mere copy-paste which leads to problems.

In Visual Studio 11 we have a great aid in avoiding this: Code Clone Analysis.

By selecting a code snippet, we can right-click it and selecting “Find Matching Clones in Solution”

image

It searches in the current document for clones, with various level of matching

image

This could be extended to the whole solution, by selecting “Analyse Solution for Code Clones” under the Analyze menu.

image

Sunday, 4 March 2012

My Work: changing the foundation of Team Explorer

In this release of Visual Studio one of the biggest change is the new Team Explorer, completely different from the previous release.

The first thing you are going to notice is the concept rounding around it: “what do I have to do?”

Starting from the foundation, one of the Visual Studio ALM 11 pillars is to allow seamless communication inside the development team. This is the base of the new Team Explorer.

So, here it is!

image

Everything is one click away, Web Access, Pending Changes, Work Items.

My Work is the latest addition, and the biggest and most noticeable.

Using it, we notice My Work evolving to a status dashboard answering the “what do I have to do? (and what did I do?)”

image

So at the moment of the check-in we now what did we modify, related to what, enabling a fluent and ‘easy’ user experience.

Friday, 2 March 2012

PreEmptive Analytics Community Edition

Before I start talking about Team Foundation Server 11, I want to point out a little new thing came out with the Beta wave.

TFS11 now includes a Community Edition of PreEmptive Analytics, a service which aggregates informations from applications’ crash and provides automated work items creation.

It’s installable from the Team Foundation Server Configuration Center

image

In this brief video Justin Marks, Program Manager for Team Foundation Server, shows up how it works.

Thursday, 1 March 2012

Speaker @ MS Days 2012 in Sofia!

image

I’m going to have two sessions in this big conference, held in Sofia, Bulgaria.

The first one (on March 28th) is an introduction to Visual Studio ALM 11, the wonderful new platform from Microsoft for Application Lifecycle Management.

The second one (on March 29th) is a hands-on session on how Hyper-V can be a must-have aid for developers.

It’s one month to go, see you there! Smile

Team Foundation Server Express Installation

With the Visual Studio ALM 11 release of yesterday, one of the greatest things you may notice is the presence of a Express Edition of Team Foundation Server 11.

It has some limitations, obviously:

  • Just Single Server installation
  • It relies on SQL Server 2012 (currently RC0) Express Edition
  • It has only Source Control, Work Items Tracking and Build Automation
  • Some agile management stuff like the taskboard, but no planning or feedback management tools
  • Free for five users
  • No Reporting Services
  • No SharePoint
  • No Version Control Proxy

Here’s the installation on Windows 8 Consumer Preview

tfs1_thumb2

Classic installation page, accept the EULA…

tfs2_thumb2

Do I really want to install it? Smile yes I do!

tfs3_thumb1

Just a note: a new metro-fied icon Smile it enforces the meaning of team collaboration IMHO

tfs4_thumb2

Meanwhile we’re talking about the new icon, the installer copies all the needed files…

tfs5_thumb2

DoneSmile Now configuration:

tfs6_thumb3

Next…

tfs7_thumb3

If we don’t want to configure a different port or user account for Team Foundation Server we may click Next…

tfs8_thumb3

Pre-installation readiness checks: everything runs fineSmile

tfs9_thumb2

It configures all the needed stuff…

tfs9.1_thumb2

That’s all folks!Smile

tfs9.2_thumb1

Then we have a brief recap of the installation.

With a bunch of clicks we have an essential but full featured ALM platform, totally free. Remember that with the new Visual Studio 11 Express Editions for Windows and Web you have the possibility of connecting to a Team Foundation Server.

We’re a long time away from the 2005 installations…Winking smile