I few weeks ago I wrote a post about Control\Reduce TFS DB Size after received a “There is not enough space on the disk” message. That post shows how to identify what Test Attachments types are taking so much space and using the MS Test Attachment Cleaner to remove them from TFS repository.

Two things, first I don’t like using Command Line tool – I prefer UI, so using MS Test Attachment Cleaner isn’t my favorite.

Second, there are other things beside Test Attachment what consume a lot of space in TFS.

So I decide to create a tool that will allow me See and Clean things I don’t need so I can release some space and junk.

So let’s start, the tool called – TFS Cleaner and have 4 sections, each section is responsible for specific area in TFS.

Workspace and Shelves

This sections allows to query for Workspaces that wasn’t changes in the past 30 days (you can change the Max Days) and shows Shelves that are older than 30 Days. For each Workspace item you can see the mappings.

You can specify that search for a specific owner, and once the search is complete you can Copy the details to Clipboard so you can send it the owner to check if it safe to delete.

Source Control

For many of my customers Source Control is responsible for Huge DB Size, due to the fact that customers adds not just source files but also binary files.

When a binary is replace with another version a new revision is created and basically multiply the size for each revision.

Source Control sections allow to you to easily browse Source Tree and see each file and folder size, this works per folder you open so you don’t have to wait until the entire tree size is calculated (can takes hours).

For each file and folder you can see the revisions and also copy the item details so you can check with the item owner if the item is needed and if not you can destroy the item.

You can also filter to display just deleted items and use the destroy button the completely remove those items from Source Control.

Test Attachment Cleaner

Same as MS Test Attachment Cleaner but with UI you can specify what file extensions to search and limit the search for work item state.

Of course you can define date range and file attachment size.

Builds

The builds section allow you to search for builds based on their status, you can search for deleted builds and destroy full build definition with all his children’s.

For some application it feels like 50% chance to get an exception, for me when an application crashes frequently I stop using it when I can find a proper replacement, but not always I can find suitable a replacement.

In case you don’t know what I’m talking about here is a small application I’ve created to demonstrate what I’m talking about.

Now, it doesn’t required a lot of work to handle those unhandled exceptions, in WPF application you need to register DispatcherUnhandledException event, from that point you need to choose how to handle that exception but the important part is handling and tracking those exceptions.

Start by register to DispatcherUnhandledException event and make sure you mark the ExceptionArgs Handled property as true, this tells the application to prevent default unhandled exception processing – CRASH.

]]>http://blogs.microsoft.co.il/shair/2014/12/09/wpf-global-exception-handler/feed/0Getting Started With Application Insights (AI)http://blogs.microsoft.co.il/shair/2014/11/26/getting-started-with-application-insights-ai/
http://blogs.microsoft.co.il/shair/2014/11/26/getting-started-with-application-insights-ai/#commentsWed, 26 Nov 2014 09:28:36 +0000http://blogs.microsoft.co.il/shair/?p=2784663Application Insights for Visual Studio Online lets you monitor your application by tracking events, exceptions, usage, counters and custom telemetry of your application.Currently AI is in preview and available only on VSO, but you can jump and start using it Today!

Currently there is two versions of AI out there – the VSO version and Portal Version, if you’re using Visual Studio Update 3 or later, you’re probably using the portal version.As I wrote AI is currently in preview and doesn’t provide all the information this kind of service should provide – OS, Browser, GEO and more analytic data – but in two weeks Microsoft should release a newer version with those metrics.

Before jumping to implementation let’s talk about the important stuff first – PERFORMANCE: I did a tiny test for Google Analytics (12.6KB and 358ms loading time) and Microsoft AI (31.5 KB and 1.08s loading time) both for Web Apps, and the timing results below.

So Google Analytics is faster and lighter but Microsoft AI gives exceptions information and additional telemetry that essential for keep track my sites and apps.

]]>http://blogs.microsoft.co.il/shair/2014/11/26/getting-started-with-application-insights-ai/feed/0How To: Enable Coded UI Html Loggerhttp://blogs.microsoft.co.il/shair/2014/11/24/how-to-enable-coded-ui-html-logger/
http://blogs.microsoft.co.il/shair/2014/11/24/how-to-enable-coded-ui-html-logger/#commentsMon, 24 Nov 2014 12:54:16 +0000http://blogs.microsoft.co.il/shair/?p=2784647Many of my customers has already build large amount of Tests based on Coded UI, those tests running every build and every day, for a second everything looks just perfect, until a test failed with unexpected exception….

Then we need to understand why? the test failed because the new build broke the test? maybe something wrong with the test?

So the obvious choice is adding logs to Coded UI, Coded UI has some basic logs capabilities, you can use either console, trace and TestContext to write logs inside your Coded UI Tests.

Now, if you didn’t add those logs at the beginning this might be a painful process but you should effort time doing so, other option is using DataCollectors to collect as many relevant information from the application to figure out what happened and try to understand the source of the problem.

By default Coded UI take screenshot on first failure.

What if you can get full Coded UI log with images for each step, detailed exception information just by adding a single line in your code?

In previous version of Visual Studio (before 2012) you had to specify the Html from configuration files but since Visual Studio 2012 you can enable the Html Trace Log directly from your code.

Just specify the LoggerOverrideState property under PlacbackSettings to HtmlLoggerState.

You don’t have to collect all steps, you can choose the logger level you want.

]]>http://blogs.microsoft.co.il/shair/2014/11/24/how-to-enable-coded-ui-html-logger/feed/0Super Simple Load Test From VSOhttp://blogs.microsoft.co.il/shair/2014/11/19/super-simple-load-test-from-vso/
http://blogs.microsoft.co.il/shair/2014/11/19/super-simple-load-test-from-vso/#commentsWed, 19 Nov 2014 10:18:33 +0000http://blogs.microsoft.co.il/shair/?p=2784636Brian Harry post about this new experience a few weeks ago so in case you haven’t heard about it here a glimpse.

Microsoft calling it “Load Test” but I think the proper term is High Scale Availability Check, because you can only test one Url, and you can’t add validations to the load so where there is not validations there is no Test.

As the post title implies it’s Super Simple Load Test, so once you open you’re VSO account click on the Load Test menu, and the desire Http/s Url choose the Test Settings (User Load, Duration, Think Time and browser mix) and just click Test Now.

The result is simple and easy to read, getting the total requests and in case of any exceptions you’ll be able to see them at the bottom of the report.

]]>http://blogs.microsoft.co.il/shair/2014/11/19/super-simple-load-test-from-vso/feed/0Sela Open House – Visual Studio Online & Application Insightshttp://blogs.microsoft.co.il/shair/2014/10/30/sela-open-house-visual-studio-online-application-insights/
http://blogs.microsoft.co.il/shair/2014/10/30/sela-open-house-visual-studio-online-application-insights/#commentsThu, 30 Oct 2014 06:29:53 +0000http://blogs.microsoft.co.il/shair/?p=2784620Last week I had the pleasure to present at Sela open house on ALM & DevOps.

My presentation about Visual Studio Online and & Application Insights is now available online so you can download and share inside you company.

Each developer will still have to pay 19$ but this is for lifetime account, a company will have to 99$ (once), the new entrance will allow you to choose which dashboard you want to enter and from there everything is pretty much the same.

Dropping of annual fees that is the big news for developers, pay 19$ for both Windows Phone 8 and Windows 8, but does it really good? From price perspective Microsoft has the best deal, and no doubt this action will bring more apps for Windows Store – but in want cost???

● Microsoft – 19$/Lifetime

● Google Developer Console – 25$/Lifetime

● Apple – 99$/Year

Maybe over the past year Windows Store reduced the gap in common apps that already available in other markets, It’s no secret and I’m hearing that from many customers that their objective it releasing their apps first to Apple (Apple users like to pay) then Android and they don’t care about Windows Store…..

From their point of view, developing or even adopting (PhoneGap | Xamarin) their apps for Windows 8 doesn’t worth the effort.

Window Store doesn’t get the same urge from developers when it comes to “Time To Market”, I don’t want to get to reasons why customer feels like that,
I do want to talk about what the new annual fee for both accounts will do.

I personally think it’s a bad idea, everyone knows that its all about the Quality, not Quantity – does bringing more and more developers for Windows Store will bring more Quality Apps? I think not – What do you think?

]]>http://blogs.microsoft.co.il/shair/2014/09/22/lifetime-dev-center-registration-for-windows-phone-8-windows-8/feed/0TFS API Part 55– Source Control Get Historyhttp://blogs.microsoft.co.il/shair/2014/09/10/tfs-api-part-55-source-control-get-history/
http://blogs.microsoft.co.il/shair/2014/09/10/tfs-api-part-55-source-control-get-history/#commentsWed, 10 Sep 2014 09:27:51 +0000http://blogs.microsoft.co.il/shair/?p=2784587This post will demonstrate how to retrieve Source Control Items, placing those items into TreeView with dynamic search for children items.

Step 4: Get Server Item History

To receive server item history we’ll call QueryHistory method from VersionControlServer, there are several ways for getting source item history but the following method we return the changes types while the rest we only return the changesets.

The query history is very simple, passing the Server Item Path, From Version, To Version)

]]>http://blogs.microsoft.co.il/shair/2014/09/10/tfs-api-part-55-source-control-get-history/feed/0TFS Performance Tips – Cachehttp://blogs.microsoft.co.il/shair/2014/08/17/tfs-performance-tips-cache/
http://blogs.microsoft.co.il/shair/2014/08/17/tfs-performance-tips-cache/#commentsSun, 17 Aug 2014 08:18:14 +0000http://blogs.microsoft.co.il/shair/?p=2784581There is always a way to make thing work faster, my customer has two App Tiers controlled by NLB and DB Cluster and still there is ways to improved TFS Performance.

Separate I/O Load By Moving Cache To a Separate Physical or Logical Drive

The last change I made to our servers made a lot of difference, as you know TFS based on IIS which means there is a cache. cache enabled so that users can download files more quickly from the cache instead of directly from the database. cache can be good but also can be bad is not managed properly.

Changing AppTier cache settings you can specify the maximum limit on the amount of storage space that the application-tier server can use for caching files. When this limit is reached, a cleanup routine makes room for newly requested files by deleting those files that have not been accessed in the longest time.