Skip to main content

Posts

Showing posts from 2011

HTML 5 and CSS: Six Complete Lessons

You want to learn HTML 5 and CSS? Microsft has created six complete lessons that cover the most interesting and dynamic new features of HTML 5 that are ready to drop into a web development or intro programming course. Each lesson comes with instructor PowerPoint slides, a complete reading assignment with hands-on examples, including the files and assets to use in each assignment. A single lesson has enough content for a 75-100 minute class session, and the hands-on examples are great for either a lab session or homework assignment. The six lessons are: Lesson 1 – Defining HTML 5 Lesson 2 – Fundamentals of HTML 5, XHTML, and CSS Lesson 3 – Introduction to CSS Layout Lesson 4 – Using HTML 5 Markup Lesson 5 – Working with Canvas Lesson 6 – HTML 5 Multi-Media and Drag and Drop This content is available at no charge and can be downloaded from here: http://www.mis-laboratory.com/faculty/

Telerik MVC Grid won't refresh after delete

For a project we are using the Telerik MVC controls. I have to say that I was really pleased with the experience in general, although I had some small issues. One of the problems I had was with the editing feature of the Telerik MVC Grid . Everything appears to work as expected except for the delete. The delete MVC action is called and the row is  deleted from the database but the grid does not refresh. [HttpPost] [GridAction] public ActionResult DeleteCodetable(string codetableType, Codetable codetable) { _codetabelService.Delete(codetable); //Rebind the grid return LoadCodetable(codetableType, refreshCache: true); } It took me some time to find the answer on the forums . The delete action only passes the id of the element to delete to the action method. This causes some model binding validation errors as the Code and Description field are required on my Codetable object. public class Codetable { [Required] public virtual int Id { get; set; } [Required] public ...

Microsoft Product Lifecycle Search

I get a lot of questions about the lifetime and end of support of multiple Microsoft products (especially about one you probably heard of before… Silverlight ). So how do you know how long Microsoft will officially support a product or technology? It’s not a secret. You only have to browse to the Microsoft Product Lifecycle Search Page and search the product or technology. Let’s do the test with Silverlight 5: So now it’s official… Silverlight 5 is dead in 2021. I guess that gives you the time you need to upgrade…

Look up DB2 error codes: the fast way

I have to admit that I’m not a big fan of DB2 although there is not much wrong with the database itself. I have more problems with the far-from-perfect tooling. One of the things that keep annoying me are the cryptic error messages including an even more cryptic SQL error code that DB2 returns. Normally I look up the error code in the DB2 Information Center , but if you need a shorter and faster way to get at least a short explanation of what an error code means, you can use the following SQL query: VALUES SQLERRM(-161) Result: 1 ------------------------------------------------------------------------------------------------------ SQL0161N The resulting row of the insert or update operation does not conform to the view definition.

Team Foundation Server 2010 Power Tools for Eclipse

Visual Studio users already know this for a long time, Microsoft has the Team Foundation Server Power tools . These tools extend the Visual Studio and Team Explorer IDE with lots of extra functionality. Now these features finally become available to Eclipse Developers as Microsoft released the first version of the Team Foundation Server 2010 Power Tools for Eclipse . “A set of Team Foundation Server power tools targeted for Eclipse developers already using Team Explorer Everywhere 2010 with SP1 to talk to TFS. This release brings the ability to be able to sign up for Team Foundation Server alerts directly from Eclipse, to save common work item details into a work item template for quick creation of new work items and to allow searching of files in source control by file name, wildcard or by the developer who has the file checked out.”

Techniques to improve your training feedback: The happiness door

Useful feedback is one the best ways to improve your training skills. But how do you know what people think? Of course you can always ask to fill in a questionnaire but that takes a lot of work, so you probably only do this at the end of your training. But this gives you only a general overview and actually it’s already too late. Wouldn’t it be nice to get feedback during the training and adapt immediately? One feedback technique I’ll give a try during my next training is ‘The Happiness Door’ as described by Jurgen Appelo in this blog post: http://www.noop.nl/2011/11/the-happiness-door.html . Don’t forget to read his tips before trying this technique. The method is very simple. You ask people to give you immediate feedback after a training session. They do this by adding notes to on a wall or door and placing it next to the happiness index (5 = excellent … 1 = bad) they want. People can add empty notes or leave some comments.

CSSCop: Integrate CSS Lint into Visual Studio

To all .NET Web developers: this is a must have tool for in your tool belt!   CSSCop makes it easy to adhere to best practices for writing stylesheets. It catches common errors that affect browser compatibility and much more. It uses the widely used CSS Lint tool behind the scenes. CSSCop brings it directly into Visual Studio in an easy and convinient way. Download available here: http://visualstudiogallery.msdn.microsoft.com/a921b98e-9430-4be2-bf53-1169e12bdb50

Team Foundation Server WorkItem FieldControl Attributes

Probably the easiest way to customize a TFS WorkItem is by using the Process editor, a part of the TFS Power Tools . Using this editor you can add your own work item fields, customize the layout and change the corresponding workflow. Next to the obvious list of settings there are some less known things you can change using the Attributes property. By using these attributes you can add custom attributes to the Work Item XML. Here are some useful attribute samples: NumberFormat (for FieldControl only): Useful if a number value is displayed in the field. Possible values: WholeNumbers, SignedWholeNumbers, DecimalNumbers, SignedDecimalNumbers. Setting this attribute determines what characters are allowed to be entered in this control. MaxLength (for FieldControl only): Maximum length of allowed characters for field control in form UI. Format (for DateTimeControl only): One of values of DateTimePickerFormat enum . Possible values: Long, Short, Time and Custom. Cu...

TF215097: An error occurred while initializing a build for build definition: Cannot create unknown type

While creating some custom build activities for TFS Build I ran into this error TF215097: An error occurred while initializing a build for build definition \OrdinaALM\TestBuild: Cannot create unknown type '{clr-namespace=Ordina.CustomActivities;assembly=Ordina.CustomActivities}Ndepend'. I discovered that my solution couldn't be loaded because TFS is looking for a particular attribute to my class. As my custom activity was completely build in XAML I had to use a partial class definition to get the attribute added. namespace Ordina.CustomActivities { [Microsoft.TeamFoundation.Build.Client.BuildActivity(Microsoft.TeamFoundation.Build.Client.HostEnvironmentOption.All)] partial class Ndepend { } }

QFEs and Hotfix Rollup Package for Microsoft Test Manager 2010

If you are using Microsoft Test Manager, this post is for you. It’s a good idea to check if you have all the hotfixes and updates installed.These updates contains features like: Multi-line support for editing test cases in Microsoft Test Manager Reduce the size of test data saved to the TFS Database Performance improvements for loading automated test cases from a build-drop path Performance improvements for publishing test results on a test suite that contains thousands of test cases in Test Manager I recommend to have a look at the full list of updates( QFEs for Microsoft Test Manager 2010 ) and download them if one or more are missing.

Team Foundation Services Update

Last week Microsoft releases the first Team Foundation Services update that introduces some significant new functionality. Normally all features we’ll see are also going to be part of the new TFS 11. So what’s new? Redone navigation model to add a bit more style, rework administration mode and more. Enhanced homepages for teams and team projects to make them more interactive and intuitive. Simplified Web UI for Small Teams Improved performance E-mail Notifications and a new UI for managing subscriptions. Forecast Lines to project where your iteration boundaries are likely to fall based on your team’s velocity and the estimates on your product backlog items. In-Tile Taskboard Editing on the taskboard. Read the official announcement and all the details here: http://blogs.msdn.com/b/visualstudioalm/archive/2011/12/08/team-foundation-service-december-update.aspx

Microsoft Patterns & Practices Roadmap

Interested in what the Microsoft Patterns & Practices has in the pipeline for us? Have a look at their roadmap. I’m especially looking forward to the Windows 8 Guidance and the CQRS guide. More information here: http://msdn.microsoft.com/en-us/practices/bb232643

Clean up your development PC

Maybe you didn’t notice it yet, but Visual Studio leaves tons of temporary files all over your hard drive. This is why, over time, your computer loses hard disk space. Same thing for Windows updates, fixes, etc… As I was running out of disk space I was looking for some ways to free some space. I found two very useful links that saved me a lot of disk space: Clean up after Visual Studio Guide to Freeing up Disk Space under Windows 7

Unlocalize.com: Translate localized error messages

If you are working on a non-English OS, you probably have seen it: these localized error messages. Very useful for the end user but very annoying for us developers who want to google or bing for this specific problem. And while searching for an English error message gives you thousands of hits, you only get a few when you use the localized error message as the search term. Last week I got the following tip from a colleague: Unlocalize.com , a very useful website which allows you to translate your localized error messages back to English. It’s even available as a browser plugin for your favorite browser. A must have for every developer!

TFS Build: Build by label

By Default Team Foundation Build services allows you to build your solutions either based on the latest version available or on a combination of the latest version and a specific shelveset. But what if you want to build a labeled version of your code? You can specify a Label in the GetVersion parameter in the Queue new Build Wizard, going to the Parameters tab (for labels add the “L” prefix):

Integrate NuGet in your build process: TFS NuGetter

Although it’s not that hard to integrate NuGet in your build process, it can always be easier. NuGettter is an extension to the Team Foundation Server 2010 build process that will perform all of the necessary versioning, packaging and deployment functions in a customizable and completely repeatable way. Capabilities/Features: Includes all phases of the build process: compile, version, pre-package, package, push/deploy and publish - managed within TFS 2010 automated build NuGet Package and deploy features for a simple to an extremely complex library package Single or multiple solution builds Single or multiple configuration builds Manage versioning of the assemblies coordinated or separately from the NuGet package Create a package, create and push a package or create a package and push and publish to a NuGet gallery Build and have immediate access to the package in a test environment through inherent "Push/Deploy" feature Push locations in...

JavaScript Unit Testing in Visual Studio: Chutzpah 1.3 released

A new version of Chutzpah is now live on Visual Studio Gallery , CodePlex and now NuGet . This release contains the following changes: Features 1. Chutzpah is now able to run Jasmine tests in addition to QUnit . 2. Added a new configuration option to set the timeout on a test file. Official announcement here: http://matthewmanela.com/blog/chutzpah-1-3-0-released/

Unity IsRegistered throws exceptions when registering Open Generic types.

For a long time, I had a very annoying error message when I called the IsRegistered method on the Unity container. Error Message: System.ArgumentException: GenericArguments[0], 'T', on 'Infrastructure.Data.NHibernateRepository`1[T]' violates the constraint of t ype 'T'. ---> System.TypeLoadException: GenericArguments[0], 'T', on 'Infrastructure.Data.NHibernateRepository`1[T]' violates the c onstraint of type parameter 'T'. Last week I finally found the root cause of this issue. Let’s have a look at my code first: public interface IRepository<T> where T:Entity { } public class NHibernateRepository<T> : IRepository<T> where T : Entity, new() { } So what’s causing the issue? Have a look at the generic constraints. You see that my interface is less restrictive than my implementation and that is what makes Unity chokes... One workaround(which is still far from ideal) is that you can...

Creating test data using ElasticObject

For a recent project I had to write a lot of data-oriented tests. This required me to populate the domain model with lot’s of test data. Having to write a lot of new statements and property setters, I was looking for a cleaner alternative when I stumbled over this library: ElasticObject - An expandable dynamic object for .NET 4.0 . A dynamic ElasticObject implementation using .NET 4.0 dynamic features, for fluent access of data types like XML - Access XML <entry name="user"/> via fluent dynamic wrappers, like var n=entry.name; - You can also use it like ExpandoObject, with multi level property support To start with, here are few scenarios you can use ElasticObject An easier, fluid way to work with data formats – like XML and JSON. Presently, we’ve some support for XML. Cleaner code though it is duck typed A hierarchical way to maintain loosely typed data. I used it to create a whole object hierarchy in a very simple way, like this: ...

Visual Studio cannot start debugging because the debug target is missing

Sometimes you lose a lot of time finding the most idiot problems. Last week I had to do a code review so I downloaded the solution from Team Foundation Service and opened it. First I wanted to try to run the application but it failed with the following error message: “Visual Studio cannot start debugging because the debug target 'D:\dev\ApplicationToReview\bin\Debug\ApplicationToReview.exe' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly.” Ok. So I rebuild the project a few times, had a look at the output folders only to see that the required assembly was definitely there. In the end I noticed that although the current project was set as the start up project but it was not configured to run in the Configuration Manager. After checking the project under configuration manager everything worked fine.

Adobe Flex/Flash versus Microsoft Silverlight. And the winner is… HTML 5!

The last weeks there were some rumors that Silverlight 5 might just be the last version of the technology . Combine this with the fact that Adobe is  killing any further development of it's flash mobile plugin and you can only conclude that both Microsoft and Adobe think that the future of web development does not lie in a proprietary plugin technology, but in HTML5 . Flash has long been the standard bearer of richer experiences inside browsers. I’ve always had the feeling that Microsoft only created Silverlight to get a piece of this cake. (Maybe someone still remembers that Silverlight version 1 was based on JavaScript?!). Although I have to admit that Silverlight showed some real potential and allowed to create stunning user experiences , far better than I had ever even seen imagined with Flash. And now that Adobe is refocusing it’s effort to HTML 5, Microsoft no longer cares and I’m guessing that Silverlight 6 will never see the light. But what about the Windows Phone th...

Mobile website vs Mobile application

With Mobile being the new hype everyone wants to build web application. But should I build a native Mobile application or is it better to build a mobile version of my web application? HeadScape released this nice info graphic helping you in answering this question:

Web.config Transformation Tester

When you deploy a Web site, you often want some settings in the deployed application's Web.config file to be different from the development Web.config file. For example, you might want to disable debug options and change connection strings so that they point to different databases. Starting from Visual Studio 2010, ASP.NET provides tools that automate the process of changing (transforming) Web.config files when they are deployed. For each environment that you want to deploy to, you create a transform file that specifies only the differences between the original Web.config file and the deployed Web.config file for that environment. A transform file is an XML file that specifies how the Web.config file should be changed when it is deployed. Transformation actions are specified by using XML attributes that are defined in the XML-Document-Transform namespace, which is mapped to the xdt prefix. The XML-Document-Transform namespace defines two attributes: Locator and Transform. The Loc...

Windows Azure Updates: SDK 1.6 and Training Kit November 2011 update released

And there is Microsoft again with 3 new updates for Windows Azure—a new version of the Windows Azure SDK, a new Windows Azure HPC Scheduler SDK, and an updated Windows Azure Platform Training Kit.    Highlights: Windows Azure SDK (November 2011 )—Multiple updates to the Windows Azure Tools for Visual Studio 2010 that simplify development, deployment, and management on Windows Azure. The full Windows Azure SDK can be downloaded via the Web Platform installer here . Windows Azure HPC Scheduler SDK — Works in conjunction with the Windows Azure SDK and includes modules and features to author high performance computing (HPC) applications that use large amounts of compute resources in parallel to complete work.  The SDK is available here for download. Windows Azure Platform Training Kit —Includes hands-on labs, demos, and presentations to help you learn how to build applications that use Windows Azure. Compatible with the new Windows Azure SDK and Windows Azur...

.NET Framework 4.5–New features overview

You want to get an idea of all the new features in .NET Framework 4.5? Have a look at this nice poster created by Jouni Heikniemi .

Showing the ‘Runas’ option in the context menu

Just a simple reminder for something that I always seem to forget: In Windows you can run the ‘Runas’ command/ This allows you to run a program as if it was running from a different user account on your computer while you are still logged on to your user account. Press and hold the Shift key and right click on the program's shortcut or EXE file, then click on Run as different user . (See screenshot below) Type in the user name and password of the user account that you want to run this program as. (see screenshot below) NOTE: If the user account is on a domain, then you would use UserName@Domain or Domain\UserName for the user name instead .

TFS 2010: TF203028 and TF203071 branching errors

TF203028: You cannot create a branch at {path} because a branch already exists at {sub path}. You see this message when a branch root exists at a sub path of the folder you are trying to mark as a branch root. In the case a sub-folder was incorrectly marked as a branch root, you can recover easily from this by converting the branch root back to a folder , from the File->Source Control->Branching & Merging->Convert to Folder menu. TF203071: The operation cannot be completed because the source folder that you specified contains a branch. If you want to perform this operation on the branch, then you must specify {path} as the source of the operation. This occurs when you try to create a branch from a folder and there is a “branch roots” below this. The reason for this restriction is consider the scenario, I have the following tree structure: $/proj/MyProduct/Branches – regular folder $/proj/MyProduct/Branches/v1.1 – regular folder $/proj/MyProduct/Branches/v...

TFS 2010: Cube processing failed

At a customer, we had some problems with the TFS Datawarehouse cube no longer being processed. When looking at the logs, I noticed the following error message: <LastRun QueueTimeUtc=" 2011-11-10T13:15:59.497Z " ExecutionStartTimeUtc=" 2011-11-10T13:16:00.517Z " EndTimeUtc=" 2011-11-10T13:18:00.637Z " Result=" Blocked "> <ResultMessage> [Version Control Warehouse Sync]: ---> MakeDataChanges() result=DataChangesPending. ---> TF221033: Job failed to acquire a lock using lock mode Shared, resource DataSync: [TFSDB].[Tfs_Warehouse] and timeout 30. </ResultMessage> </LastRun> Some useful links to solve this problem: Monitoring the TFS Data Warehouse – FAQ TFS2010: Warehouse and Job Service Administrator Reports Our solution: Go to the warehouse control service, which in our case is at: http://tfs:8080/tfs/TeamFoundation/Administration/v3.0/warehousecontrolservice.asmx From there click...

TFS 2010: Administrative reports

After blogging about 2 administrative reports some time ago, I have a new list with useful reports for the TFS administrator. Microsoft released some reports that visualize the information that TFS stores about the health of the data warehouse. These reports are useful to TFS administrators, operations/support teams, project administrators & end-users. The reports in this pack display the following kinds of information: Recent processing times Current status (whether the cube is processing now and, if not, when it is scheduled to process next) Schema conflicts Most recent time that each adapter successfully ran Interpreting the reports In the download, there is a FAQ document which includes screenshots of what different reports mean and common questions. The contents of the FAQ are also available at Monitoring the TFS Data Warehouse – FAQ . Requirements SQL Server Reporting Services 2008 or 2008 R2 A shared datasource to which you connect the...

Attempt by security transparent method to access security critical method

Last week I was spending some time integrating the Microsoft Enterprise Library Data Access Application Block with the MVC Mini Profiler . After overriding some methods, I was ready to run my first test. But instead of getting some profiling results all I got was the following error message: “Attempt by security transparent method 'Microsoft.Practices.EnterpriseLibrary.Data.Database.CreateConnection()' to access security critical method 'MvcMiniProfiler.MiniProfiler.get_Current()' failed.” So why did I got this error and what does it mean? Let me first tell you that the Enterprise Library assembly is marked with the AllowPartiallyTrustedCallersAttribute and uses the level 2 security transparency model.  Level 2 transparency causes all methods in AllowPartiallyTrustedCallers assemblies to become security transparent by default. In .Net4.0 framework, security tranparency rules prevent any security transparent code to call into security critical cod...

Windows Azure Training Kit: October 2011 release

And there is the Azure team again… The October release of the Windows Azure Platform Training Kit (WAPTK) is now available as a free download . Download the full training kit including the hands-on labs, demo scripts, and presentations here . Browse through the individual hands-on labs on MSDN here . The October 2011 version of the training kit includes the following new and updated content: HOL: SQL Azure Data-tier Applications NEW HOL: SQL Azure Data Sync NEW HOL: SQL Azure Federations NEW DEMO: Provisioning Logical Servers using Cmdlets NEW DEMO: Parallel Computing on Windows Azure - Travelling Salesman NEW SQL Azure Labs and Demos with the new portal and tooling experience UPDATED Applied several minor fixes in content UPDATED For more information about the new SQL Azure content, including the new HOLs, please refer to the blog post, “New and Updated SQL Azure Labs Available” , just posted to Roger Doherty’s blog.

Waterfall project management was a mistake

Last week I was reading the ‘Are project managers living a lie?’ blog post by Peter Saddington, when I noticed the following eye-opening paragraph: “It has always been eye-opening to many people when I tell my workshop participants or clients that they old waterfall way of doing software was never intended to be used. It was a misinterpretation of Dr. Royce’s seminal paper. What happened was that government agencies read the first page, saw a diagram (with a poorly chosen caption), and said: “Hey, that’s how we do software development! Yes, that’s right. Waterfall project management was never the point. It was actually iterative development that Dr. Winston Royce was pointing to… later in his paper. If they had read the second page of Dr. Royce’s paper, they would have found the following quotes: “I believe in this concept, but the implementation described above is risky and invites failure.” “Yet if these phenomena fail to satisfy the various external co...

Visual Studio 2010: NUnit support

Microsoft announced full support for NUnit and other Testing frameworks in Visual Studio 11. However today you still don’t have NUnit integration out-of-the-box. Of course you can use the Resharper plugin or TestDriven.NET but these are not free(although worth every cent). Last week I discovered Visual Nunit , a free alternative to run your NUnit tests inside Visual Studio.   Visual Nunit is an open source NUnit runner for Visual Studio 2010. It provides convenient view to test cases and enables debugging (red arrow) tests easily inside development environment. It does not require separate test project. Implemented as Visual Studio Integration Package. Features: Easy test debugging Easy and fast NUnit test execution NET 2.0, 3.0, 3.5 and 4.0 support Test execution progress, time and summary Stack trace view Test filtering based on project, namespace and fixture

JavaScript Patterns: Settings object

One of the patterns you see a lot in jQuery and other JavaScript based framework is the use of a Settings object to pass configuration data to a module or function. Again without spending too much words, a short sample: (function ($) { $.fn.blink = function (options) { var settings = { 'speed': 'fast', 'repeat': 3 }; //if the options isn’t null extend defaults with user options. if ( options ) { $.extend( settings, options ); } for(var i = 0;i<settings.repeat;i++) { this.fadeOut(settings.speed); this.fadeIn(settings.speed); } } })(jQuery); This is a function from a jQuery plugin(can’t remember the exact name). But the important things to notice here are: The blink method allows you to pass an options object.   Inside the blink method a settings object is created with some default settings.   If the user specified the options object, it will ove...

IBM Rational to Team Foundation Server Integration Tools - Training and Exploration Sandbox

While I’m busy working on a IBM Rational ClearCase to Team Foundation Server migration, I discovered that the ALM rangers have provided an evaluation and training sandbox. It offers an easy to use and near-zero-admin exploration, training and testing environment for IBM Rational ClearCase and/or IBM Rational ClearQuest migrations to Team Foundation Server, based on the latest supported Team Foundation Server Integration Tools . Supported scenario’s Some of the supported scenario’s in this environment are: IBM Rational ClearCase to Team Foundation Server migration IBM Rational ClearQuest to Team Foundation Server migration Team Foundation Server to Team Foundation Server migration How do you get started? Access the sandbox in three steps: 1. Register at teamdevcentral.com 2. Check your e-mail 3. Connect using RDC over the Internet as per received instructions More information here .

Telerik MVC Grid: Client Side filtering

One of the nice features of the Telerik MVC Grid is filtering . What makes this even cooler is that you can easily add your own filters using the client side API. An example: $(function () { var button = $("#filterButton"); var filtered = false; button.click(function (e) { e.preventDefault(); var grid = $("#ordersGrid").data('tGrid'); if (filtered === false) { button.html('Remove filter'); filtered = true; //Add filter grid.filter("OrderID~eq~10255"); } else { button.html('Add filter'); filtered = false; //Remove filter grid.filter(''); } alert("clicked"); }); }); Remark: Unfortunately this only seems to work when operationmode of the grid is not changed to GridOperationMode.Client.

Javascript Patterns: The Module pattern

There are a lot of different ways to structure your Javascript code (and the most popular one remains no structure at all ). One of the most used patterns out there is the Module pattern. Instead of giving you a long explanation, let me show you a short sample: var module=(function(){ var helloText='Hello world' function sayHello(){ alert(helloText); } return { sayHello: sayHello}; })(); module.sayHello(); What’s happening inside this code? I create a JavaScript function that I immediately invoke. The result is assigned to the variable ‘module’.   Inside this function I create a variable called ‘helloText’. As JavaScript uses function scope instead of block scope, this variable is available everywhere inside this function but not outside of it.   I add a function ‘sayHello’, this function is also only accessible inside the ‘Module’ function.   As a last step I create a new JavaScript object with a function sayHello on it that refers to the internal ‘...

Bug in Telerik MVC Grid Control: Displaying items 1 - NaN of undefined

After starting a project with the jqGrid control, we decided to move to the Telerik MVC Grid control . Although a very powerful control, some advanced scenario’s were just too painful to implement with the jqGrid. So we replaced the jqGrid control with the Telerik MVC Grid control and were really happy with the result(we were able to get the same functionality with half the amount of code). However it still has some rough edges here and there. One error we got was when our grid control was bound to an empty list, the following text was shown in the pager part: ‘Displaying items 1 - NaN of undefined’ . This issue is mentioned on the Telerik MVC forums and a bug fix is available here . UPDATE: Last week Telerik released their first beta of the Q3 2011 version of the Telerik MVC controls. I validated the beta and it seems that the issue is no longer there. Great job Telerik!

OData Service for Team Foundation Server 2010 - v1

A few months ago Microsoft released the beta of the OData Service for Team Foundation Server 2010. Last week they finally  announced that v1 of this service is now available and you can download it here . What is it? The purpose of this project is to help developers work with data from Team Foundation Server on multiple device types (such as smartphones and tablets) and operating systems. OData provides a great solution for this goal, and has been embraced by numerous developers for building great device-specific applications. OData is accessible from any device and application stack which supports HTTP requests. This OData service interacts directly with the TFS client object model . Check out Brian Keller’s post for more information.

Visual Studio Troubles: The project file has been moved, renamed or is not on your computer

After doing a rename and merging a solution inside Visual Studio(one tip: never try to combine these two things at the same time), one project don’t want to load anymore. Instead I always got the following error: “The project file has been moved, renamed or is not on your computer.” I tried a lot of stuff but in the end the following solution worked: Close Visual Studio. Browse to the solution folder of the project which is giving you problems. Find the .suo file and delete it. Reopen your solution. Visual Studio will recreate the .suo file and everything worked.

Visual Studio 2010 Feature Pack 2

Between all the fuzz about Windows 8 and Visual Studio 11, you should almost forget that we still have a long way to go with Visual Studio 2010. Microsoft extended the rich feature set of VS by releasing the second Visual Studio 2010 Feature Pack . This Feature Pack has following features :- Testing features: Playback tests using the Mozilla Firefox browser. You can use Windows Internet Explorer 7 (or later versions) to record UI actions on a website or a Web-based application and then play back the tests using the Mozilla Firefox browser version 3.5 and 3.6. Edit coded UI tests using the Coded UI Test Editor. The editor lets you easily modify your coded UI tests. You can locate, view, and edit your test methods, UI actions and their associated controls in the UI control map. You can create coded UI tests or action recordings for Silverlight 4 applications. Action recordings enable you to fast forward through steps in a manual ...

Visual Studio 11 Developer Preview Training Kit October 2011 Release

Microsoft released their first Training Kit for the upcoming Visual Studio 11. “The Visual Studio 11 Developer Preview Training Kit includes hands-on labs to help you understand how to take advantage of the variety of enhancements in Visual Studio 11 and the .NET Framework 4.5, how to support and manage the entire application lifecycle and how to build Windows Metro style apps.” Instructions There are two files you can download to install this Training Kit: The file VS11TrainingKitOctober2011.Setup.exe will install the entire training kit, After downloading this file, you do not need an Internet connection to install the files. Download and launch the self-extracting package. The Training Kit will uncompress to the selected folder and launch a HTML browser for the content. The file VS11TK_WebInstaller_Preview.exe provides you with the ability to install all or only some of the training kit. Download and launch the self-extracting package. Then select the labs you wis...

Compiler as a service: Project Roslyn

Microsoft announced the availability of the Roslyn CTP last week. This release marks a significant step to the new way of thinking of compilers, and the agility that is now possible with language innovation, IDE tooling, and powering the ecosystem. The C# and VB compilers are no longer black boxes – something we put source text into, do some magic on, and get an assembly out. All that rich information about code is no longer thrown away, but is now exposed as a full-fidelity object model that can be easily consumed by all. In addition, it was released a preview of the first-ever Interactive window for C# that contains full IDE support – including IntelliSense and even automatically detecting missing using directives. How to get started: Download the CTP . The CTP installs on Visual Studio 2010 SP1 and can be safely installed side-by-side with Visual Studio 11. Go to Start -> All Programs -> Microsoft Codename Roslyn CTP -> Getting Started to la...

Downloading an old version of a NuGet package

By default NuGet will always download the latest version of a package. But what if you don’t want the most reason version? Luckily there is a way to specify the package version by using the Package Manager Console in Visual Studio. First bring up the Package Manager Console in Visual Studio. Go to Tools|Library Package Manager|Package Manager Console . You can install a package by using the ‘Install-Package’ powershell command. This command has a Version argument that can be used to specify a specific version. Install-Package PackageName -Version 1.3.1 See the command reference for details. If you use the Intellisense feature inside the Package Manager Console(by using the TAB key), you even get the list of available versions. The same thing works if you want to update an existing package, this time by using the ‘Update-Package’ powershell command. Update-Package PackageName -Version 1.3.2

The power of HTML 5 and Javascript: Rendering PDF’s in your browser

Today I was once again amazed about the power that HTML5 and Javascript can offer when I discovered PDF.js. This Javascript library is written by a couple of clever guys over at Mozilla and allows you to display PDFs inside your browser using Javascript and HTML5 . The code is available for download on Github . Benefits The traditional approach to rendering PDFs in a browser is to use a native-code plugin, either Adobe’s own PDF Reader or other commercial renderers, or some open source alternative. From a security perspective, this enlarges the trusted code base and increases the risk of code based injection attacks. An HTML5-based implementation is completely immune to this class of problems. If you want to see a demo of pdf.js , click on this link . There are still glitches and rendering artifacts but it already shows the potential of this library. A quick sample Download the latest code required from Github to start developing. Create a web page and embed the following Ja...

Enterprise Library: Windows Azure Autoscaling application block

Last week Microsoft released a beta version of the  Windows Azure Autoscaling Application Block .To learn more about this application block watch the video walkthrough: The easiest way to download the block is via NuGet . There are two packages – one with binaries and one containing the source. The beta includes a sample application for hosting the block and for exploratory testing. This version offers a lot of new features as well as bug fixes. Check this page for the change log. Getting Started Please follow the instructions in the included Readme file to learn how to use the block binaries and about the pre-requisites if you want to build the block from source. They also released a first draft set of documentation, which includes the reference documentation and an early preview of the Developer’s Guide . Both are available via Codeplex . There is also a sample app that showcases various usages of the Autoscaling Application Block. Therefore they expanded the scope...

Team Foundation Server Source Control Explorer VS 2010 Extension

TFSSCExplorerExtension is a Visual Studio 2010 Extension Package that adds new functionality to the TFS Source Control Explorer window. Most important features are Drag & Drop support, Move and Branch functions even for multiple files selection and Merge from Sources feature. There is a version available both for Visual Studio 2010 and Visual Studio 11 Developer Preview: VS 2010 version VS2011 DP version

Telerik MVC Extensions: Using a more recent jQuery version

If you are looking for custom ASP.NET MVC controls, the Telerik MVC Extensions are one of the options. If you are using them you probably included them in your ASP.NET MVC web application by using NuGet. These extension are jQuery based and jQuery 1.5.1 is included out of the box. Including the required Javascript files is easy. Just at the following code to the bottom of your Razor page(your Telerik controls should be placed BEFORE the scripts). @(Html.Telerik().ScriptRegistrar()) This will include jQuery and all other required Javascript files automatically. But what if you are using a more recent jQuery version? I first removed the jQuery script from the Scripts\2011.2.712\ folder but this resulted in errors. Instead what you need to do is change your script as follows: @(Html.Telerik().ScriptRegistrar() .jQuery(false) ) The ScriptRegistrar will no longer complain and you can reference the jQuery version of your choice. I tried it with jQuery 1.6.2 and everything w...

Running your build server on Azure

With the first preview of TFS Services(read: Team Foundation Server on Azure), you’re ALM environment in the cloud get’s a lot closer. But what about my build server? Do I still need to host some servers myself or is their an alternative available? Although not an official solution (yet), one of the options you have is using an Azure VM Role with a build service, and configure it against your TFS Services instance. What’s needed to get this working? First of all you need a Windows Azure account of course. Login to the Windows Azure portal( http://windows.azure.com ) and sign up for the VM role beta program(yes it’s still in beta). It can take some time before your subscription is approved so be patient(it took a few weeks before our subscription was activated). While you are waiting for your subscription approval you can already create the VHD required for your VM role. Follow the steps as described in the following post: http://msdn.microsoft.com/en-us/wazplatformtrainin...

TFS Build Error: The process cannot access the file 'data.coverage' because it is being used by another process

Last week we had a situation on our build server where the build was running indefinitely. After stopping the build, the following error was thrown: The process cannot access the file 'data.coverage' because it is being used by another process. As the problem only happened when code coverage was enabled, I guessed that it had to do something with the test runner. One thing I noticed on the build machine that the VSPerfmon.exe kept running. After killing this process, the build completed and the issue was gone.

Customizing TFS Build 2010

If you are looking into TFS Build customizations, I can recommend starting with the following blog series by Ewald Hofman: Part 1: Introduction Part 2: Add arguments and variables Part 3: Use more complex arguments Part 4: Create your own activity Part 5: Increase AssemblyVersion Part 6: Use custom type for an argument Part 7: How is the custom assembly found Part 8: Send information to the build log Part 9: Impersonate activities (run under other credentials) Part 10: Include Version Number in the Build Number Part 11: Speed up opening my build process template Part 12: How to debug my custom activities Part 13: Get control over the Build Output Part 14: Execute a PowerShell script Part 15: Fail a build based on the exit code of a console application Part 16: Specify the relative reference path Afterwards you can get into more detail by browsing through Jason Prickett’s blog at http://blogs.msdn.com/b/jpricket/ .

Use Fiddler to validate version problems with Javascript libraries

I’m a big fan of Fiddler for a long time. Last week I had to test some jQuery compatibility issues with a new web application we were building. At first I was replacing all the Javascript files with newer versions, updating all the references and so on… Although this approach worked it was cumbersome and error-prone. Isn’t there a better alternative? Fiddler to the rescue! I found the following post by Eric Law where he uses Fiddler to load a different version of jQuery without updating any reference: http://blogs.msdn.com/b/ieinternals/archive/2011/08/19/using-fiddler-to-verify-a-jquery-update-will-fix-a-compatibility-problem.aspx .  Exactly where I was looking for! So how can you do this? First, download the (newer) version of the library you want to test. Start Fiddler and go to the AutoResponder tab. Use the Add… button to create a new rule to map requests for your Javascript library to the newly downloaded file. Also set the Unmatched requests passthrough option ...

Developer cheat sheet

As a developer there are so many things you need to remember: keyboard shortcuts, programming language syntax, code snippets, … and the list keeps growing. So make your life as a developer a little bit easier and use this ultimate cheat sheet at http://devcheatsheet.com/ . “DevCheatSheet.com is a directory of free cheat sheets and quick reference cards for developers, programmers, engineers, and nerds”  

NServiceBus Modeling Tools

If you are still not convinced that NServiceBus could make your message based architecture a lot simpler, maybe this new feature can convince you: NServiceBus Modeling “Visual Studio integrated modeling tools for NServiceBus allow you to graphically design your distributed solution and have all of your projects created, appropriate references set up, configuration of queues and routing made to "just work", on top of all the regular NServiceBus goodness.” This first version includes Visual Studio integration and really makes developing with NServiceBus much more productive and enjoyable. NServiceBus Modeling Tools for Visual Studio from NServiceBus Ltd. on Vimeo . You can get this tool on the NServiceBus download page or via the Visual Studio Gallery here .