Google Website Translator Gadget

Friday, 28 December 2012

Async support for running Silverlight Unit Tests

One of the great new features included with .NET 4.5 and Visual Studio 2012 is the async/await support for writing more elegant multi-threaded code in C# or Visual Basic.  Support for writing tests that make use of the async/await keywords is available for the Microsoft Test Framework as well as most of the other popular xUnit testing frameworks like NUnit.  In addition to providing support for async/await baked into the compilers for Visual Studio 2012 and .NET 4.5, Microsoft has also released the Async Targeting pack for Visual Studio 2012 that enables projects targeting .NET 4.0 or Silverlight 5 to use the Async language feature in C# and Visual Basic code.

Using it in your Silverlight 5 code is quite handy – especially when invoking web services from the client.  However, the Microsoft Test Framework for Silverlight has not been extended to support running these asynchronous tests.  However, in a recent blog post by Morten Nielsen he shows how it is possible to go about adding this support to the Silverlight Test Framework.  He provides a customized version of the Silverlight Test Framework, but also urges us to go vote for getting this added directly to the official Silverlight Toolkit

I know a lot of development shops like ourselves still have quite a substantial amount of Silverlight code to maintain, so please go and vote for the issue to get Microsoft to add support for it in the Silverlight Toolkit.

Monday, 19 November 2012

FxCop Standalone for VS 2012, .NET 4.5 and Portable Libraries

In our current team environment we are using the VS 2012 Professional SKU with a MSDN subscription due to the cost savings it affords us.  That implies that we miss out on features like the integrated Code Analysis.  Up till VS 2010, Microsoft released an updated edition of the Code Analysis engine with the standalone FxCop installation.  That implied that even though we didn’t get the tooling integrated into Visual Studio directly, at least we could use the standalone edition of FxCop to execute the same set of Code Analysis rules on our code base - albeit in a bit more laborious fashion.

With VS 2012 Microsoft has not yet released an update to the standalone FxCop.  Here’s the MSDN forum post where I raised the issue as to when an update will be released.  The current standalone edition also doesn’t seem to support the new Portable Library format being used to cross target different .NET platforms.  Following the advise on the forum post I’ve created an UserVoice issue to request an update.  So if you are in the same boat as to using the standalone edition, please head over to UserVoice and go vote for the issue to get it resolved.  Thanks.

PS: Btw, if you would like to run the standalone FxCop in VS, you might want to consider the FxCop Integrator.  Haven’t used it, but it seems promising although there hasn’t been an update for a while.

Monday, 16 April 2012

Practical Performance Profiling E-book

The folks at RedGate, makers of some quality .NET and SQL Server tools like Reflector, ANTS Memory and Performance Profiler, SQL Monitor (and much more) have published an excellent, free book on performance profilingPractical Performance Profiling by Jean-Philippe Gouigoux seems like a wonderful comprehensive guide for improving application performance by understanding performance bottlenecks from every possible angle.   Do yourself a favour and register to get your own copy soon.  Happy profiling Smile

Wednesday, 08 February 2012

Silverlight 5 Upgrade Woes

We recently struggled to upgrade the UI of On Key, Pragma’s Enterprise Asset Management System (EAMS) to Silverlight 5.  We struggled with getting Silverlight 5 binaries for a lot of the open source projects (Moq, Castle.Core), but it was the lack of development tooling support in Visual Studio 2010 that really disappointed us.  I can understand that the open source projects are slack in providing support for Silverlight 5.  We solved the problem by getting the source code and creating Silverlight 5 binaries ourselves.  However our hands are cut off when it comes the development tooling in Visual Studio.  Expression Blend 5 is still only in preview edition with no word on when a final version that supports the SL 5 RTW will be provided.  Code Analysis (FxCop) and Code Metrics analysis are broken for Silverlight 5 projects.  I find it very disappointing that MS didn’t make sure that all parts of the development tooling surrounding Silverlight 5 was working by the time that Silverlight 5 went RTW.  Hopefully these issues will be resolved soon, but one sort of gets the impression that with no more momentum behind Silverlight it might take quite a while Sad smile