Archive
A Better Build Explorer for TFS 2010
Recently, I came across this new project on codeplex. This looks simple but still it answers almost all usability issues with visual studio’s integrated build explorer. Issues like..
- Quickly Loading build history, with minimum clicks.
- Monitoring builds in progress
- Locating errors and warnings
- Easily going though huge build log.
I bet, if you are working with a huge number of builds in your organization as I do, you will immediately pin this tool to your taskbar.
It can be downloaded at : http://buildexplorer.codeplex.com/downloads/get/379077
As it is opensource, you can also contribute.
Error MSB3482 : An error occurred while signing: Keyset does not exist
This is a build error got while building a .net project. This error basically indicates that certificate (.pfx) used for sighing the assembly has been expired. Make sure that certificate is renewed and error will disappear.
Delete files permanently in TFS
In TFS Source control you can not delete files permanently. Its just a temporary delete. Deleted folder/files can still be viewed from Team explorer through option called “show deleted items in source control explorer” from Tools > Options > Source Control > Visual Studio Team Foundation Server and then can be “UnDeleted” if required.
So, what if you want a permanent delete with NO recovery. This can be done using team foundation command line interface. Following is the syntax for the same.
tf destroy <path for TFS Item to be deleted> collection:<TFS Collection Name>
Performance Counters Timeouts and Load Testing with Visual Studio
If you are getting following error while running load test and wondering why this happens. Here in this blog entry I highlight ways to fix it.
The performance counter category ‘Memory’ cannot be accessed on computer ‘COMPUTER01’ (Timed out trying to read performance counter category ‘Memory’ on computer ‘COMPUTER01’); check that the category and computer names are correct.
Performance Monitor Tool (perfmon)
This is a well known Windows in-build tool for fetching performance data. First try to fetch the required performance counter from specific machine through this tool. You may notice two things here if your machine is a remote machine. If it takes more time (more than 1/2 minutes) to get the performance counters, that will indicate that you need to change timout values for load test configuration. OR if it does not access the counter then there are permissions issue.
Performance Monitor User Permissions
If you are not able to access performance data from perfmon, then you have to correct that first. As same permission level applies to visual studio load test when it tries to fetch performance data. User who is trying to access performance data (locally/remotely) should be part of ”Performance Monitor Users” and “Performance Log Users”. If there are not much security concerns make the user part of Local “Administrators” group which will ensure full access on the machine.
Sometimes still there may be some issues. In that case just remove the User or the Group of which the User is part of, from “Users” Group of target machine. Which will provide you fully un-restricted access to machine.
Firewall Exceptions
Rarely you may have to do it. Either turn off the local firewall or enable the rules for Performance Logs and Alerts in the Windows Firewall with Advanced Security snap-in.
Load test timeout settings
If permission levels are all fine. But still you are still running into the same issue. That means you have to set load test’s performance counter initialization time out settings. But where to do that? as there is no provision to do it though VS IDE. For that you have to do some manual configurations in load test’s hosting process’s configuration file. Now this configuration file is different for VS 2008 and VS 2010. Following are the details on that.
For Visual Studio 2008, open the file VSTestHost.exe.config in the folder C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
OR
For Visual Studio 2010, open the file Devenv.exe.config in the folder C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
AND then add following entries to it. That will solve the timout issue.
<appSettings>
<add key=”LoadTestCounterCategoryReadTimeout” value=”60000″/>
<add key=”LoadTestCounterCategoryExistsTimeout” value=”60000″/>
</appSettings>
CUITe Framework (Coded UI Test)
This weekend I came across a new development in VS Coded UI Testing. Called CUITe (Coded UI Test Enhanced). This is a codeplex project. It is a wrapper over visual studio’s coded UI test framework. Following are some very interesting features worth trying. I am sure whole automated functional testing community has faced lot of issues with Coded UI test. Specially with code maintainability and readability. This wrapper has tried to answer these two. So, here are some interesting things about CUITe.
Features:
- Simple to setup and use. Just install and refer to one dll “CUITe.dll” in your automation project.
- It keeps UI Object definitions separate from automation code. BIG Relief.
- Web Automation: Treat table as Table.
- Web Automation: JavaScript execution support.
- Support for Custom UI objects.
- Supports SilverLight and whatever Coded UI Test supports underneath.
- No more misnomer UI object type names.
- Common behavior has been moved to base classes.
- Automation code becomes more readable and maintainable.
JavaScript support
Interesting feature. Which can be used to handle some tricky situations. For example invoking context menus on web pages which sometimes can not be invoked by mouse click API.
Visual Studio 2011 : Getting started.
Visual Studio 11 Dev Preview
The next version of Visual Studio and .NET framework contains many new features and enhancements, making job of .NET developer easy. So why to wait. Just get started.
Debugging an Addin in visual studio
Following are the steps :
- Delete all bin and obj files
- Copy paste any snk file where it is required
- Set appropriate debug type you want for the project
- Right click on addins project , set “addin project” as startup project
- Right click on “addins project”, select properties and set as shown in the screen shot below
- Set Start external program C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
- Set Command line arguments /resetaddin <addin lib name without extention>
- Set working directory C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
- Create folder addins in C:\Users\<user>\Documents\Visual Studio 20101\Addins
- Copy paste the addin definition file and set the parameter <Assembly> as <Assembly>Path to AddIn.dll</Assembly>
- Make sure that in addin definition file value of <FriendlyName> node should be exactly same as that of addin definition file name.
- Run the project in debug mode.
TFS 2010 : How to Videos
MSDN has many videos that show how you can use Visual Studio ALM tools and Team Foundation Server to help your team develop software more successfully. Here is the list of most important ones
Troubleshoot : Visual Studio Web Test – Response body capture limit
While working with visual studio webtest for load testing, I came across this issue where response of the web request was cut short because of the default limit set for that by visual studio. Actually I was using some extraction rules to fetch some values from the response of that particular request. Following snapshot shows webtest playback window. The highlighted response tab shows “(Truncated)” to indicate that the response from the web request has been cut short.
Basically, the default response size limit set by visual studio is 1.5 MB. The setting can not be changed from webtest/web request property window. It can be overridden either through coded version of the web test or using web test plugins. Following code snippet shows the webtest plugin method. Though, it will be the same property which should be set while working with coded web test.
public class WebTestPlugIns : WebTestPlugin
{
public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
e.WebTest.ResponseBodyCaptureLimit = 3000000;
}
}
In this code snippet I am overriding the response capture limit to 3MB.



