Skip to main content

Posts

Showing posts from October, 2012

Another nice Team Foundation Server 2012 feature: formatted activity log

Last week, when I was checking the outputs of a failing build, I found another nice new feature in Team Foundation Server 2012. The build activity log is now combined with a nice xsl file, which gives you a formatted output when you open the ActivityLog.xml directly from the File Explorer. So you no longer need to open up Visual Studio to see all the things that happened. Nice!

Team Foundation Server 2012: Configure security to access data warehouse

Team Foundation Server gives you a rich set of reporting data available through reporting services and excel reports. If these out-of-the-box reports are not sufficient for you, you can always connect directly to the TFS data warehouse. Microsoft did a great job in improving the data warehouse structure to make it easy to browse through all available info and create your own queries. The easiest way to do this is by using the Analysis services integration in Microsoft Excel. Just follow the wizard and you get all the data you’ll ever need… However there is one extra step you need to do before users can complete this wizard successfully, you must grant these users read access to the databases that make up the data warehouse. You can grant access to the analysis services database, the relational database, or both, depending on what types of reports will be created. To grant a user or group read access to the analysis services database On the Start menu, point to All Progr

Windows 8 and Windows Azure Virtual Labs available

Interested in testing all the new features in Windows 8 and/or Windows Azure? But you don’t want to spend a day installing all required prerequisites? Then the MSDN Virtual Labs are the solution you need. They enable you to quickly evaluate and test Microsoft's newest products and technologies through a series of guided, hands-on labs that you can complete in 90 minutes or less. There is no complex setup or installation required, and best of all, it’s free! Windows 8 Virtual Labs Lab 1 for C# - Creating a Windows 8 App Contoso Cookbook is a series of hands on labs designed to immerse you into Windows 8 app development. In this first lab in the series, you will use XAML and C# to create the application, implement navigation, download the data from Windows Azure (or load it locally if you don’t have an Internet connection), and connect the data to controls using data binding. Lab 2 for C# - Orientation, Snapping, and Semantic Zoom In this lab, you will build

Improve your application performance by doing nothing(or almost)

One of the optimizations you get for free in the new .NET Framework 4.5 release is Multicore JIT compilation.  Today, the assumption is that you have at least two processors. This feature takes advantage of this extra processing power by using parallelization to reduce the JIT compilation time during application startup. If you want to get all the details, check the following post http://blogs.msdn.com/b/dotnet/archive/2012/10/18/an-easy-solution-for-improving-app-launch-performance.aspx Enable Multicore JIT for your ASP.NET web applications For your ASP.NET web applications it’s easy, you have to do nothing . Once your application/webserver is upgraded to ASP.NET 4.5, your application start up will go faster. Microsoft took into consideration that ASP.NET applications runs in a hosted environment, so they turned on Multicore JIT for these applications automatically. So if you're running ASP.NET 4.5, you don't have to do any extra work to turn on Multicore JIT. If you want

New branching and merging guide available

The ALM Rangers have released their new Branching and Merging Guide . Release notes: What is new? The Version Control specific discussions have been moved from the Branching and Merging Guide to the new Advanced Version Control Guide. The Branching and Merging Guide and the Advanced Version Control Guide have been ported to the new document style . See http://blogs.msdn.com/b/willy-peter_schaub/archive/2012/10/17/alm-rangers-raising-the-quality-bar-for-documentation-part-2.aspx for more information. Quality-Bar Details Documentation has been reviewed by Visual Studio ALM Rangers Documentation has been through an independent technical review Documentation has been reviewed by the quality and recording team All critical bugs have been resolved For more information on this project, please visit the Codeplex project.

CQRS–Frequently asked questions

Last week I discovered http://www.cqrs.nu/ ,  a great site if you are interested in CQRS and have lots of questions. “ The ideas around CQRS are fascinating, but different enough from the way we do conventional development that some questions come up again and again. This page collect a number of such questions that we've encountered, and attempts to give accurate and satisfactory answers to them.”

TFS 2012 Build: Configure NUnit to run your unit tests

With the release of Visual Studio and Team Foundation Server 2012, it becomes a lot easier to use other test frameworks than MS Test. Now it becomes possible to run NUnit, XUnit,… tests directly from Visual Studio using the same tooling and interface. But how do you configure your build server to run these tests? Download the NUnit Test Adapter from the Visual Studio Gallery( http://visualstudiogallery.msdn.microsoft.com/6ab922d0-21c0-4f06-ab5f-4ecd1fe7175d ). Install the adapter vsix on all your build servers. Add the nunit.core.dll, nunit.core.interfaces.dll, nunit.util.dll and NUnit.VisualStudio.TestAdapter.dll to a folder in source control. Set this folder as the Version control path to custom assemblies. This can be managed by clicking “Manage Build Controllers” on the Build menu. Click on properties and set the correct path in version control. Using VS 2012, edit your build definition, go to “Process”, click on “Test Source”, and then click on

Internet Explorer 10 is coming to Windows 7 (but later then expected)

I probably missed the announcement somewhere, but last week I saw this post by Rob Mauceri mentioning that IE10 will become an update for Windows 7. That’s great news, I was afraid that Window 7 users would have to miss the goodness that IE 10 offers. That was the good news, the bad news is that we’ll have to wait longer as expected(most people thought that IE 10 would become available to Windows 7 after the Windows 8 release). To quote Rob Mauceri, Group Program Manager, Internet Explorer: “As we approach general availability of Windows 8, we want to provide an update on IE10 for Windows 7. We will release a preview of IE10 on Windows 7 in mid-November, with final availability to follow as we collect developer and customer feedback.” So no official release date yet .

Windows Azure Training Kit October 2012 Release

With all the new features that keep being added to Windows Azure, it’s hard to stay up-to-date. But Microsoft makes our live easier by releasing a new version of the Windows Azure Training Kit every few months. This month they are back with the October 2012 update . It  includes 47 hands-on labs, 24 demos and 38 presentations. Some of the updates in this version include: Updated 22 presentations with speaker notes Added 7 new demo scripts for content delivery Added navigation page for demo discoverability Updated hands-on lab page sub-navigation So this time, no new features, but some useful guidance how to teach the content to others…

SUCCINCTLY SERIES: A collection of great free e-books

Syncfusion publishes the Succinctly series concise technical books that target developers working on the Microsoft platform. Each book is around 100 pages and is guaranteed to enlighten you on the topic of interest. Download your free copy today(you’ll have to register but it’s worth it). New releases are coming out every few months but today they offer the following books in this series: Knockout.js Succinctly C++ Succinctly ASP.NET MVC 4 Mobile Websites Succinctly LightSwitch Succinctly JavaScript Succinctly HTTP Succinctly PDF Succinctly Git Succinctly jQuery Succinctly

Visual Studio 2012: Design Patterns UML diagrams

Last week I discovered this great Visual Studio extension: Design Patterns UML Toolbox Provides Visual Studio 2012 UML toolbox items representing the majority of the Gang of Four design patterns. The patterns are split into Creational, Structural and Behavioural sections, and includes a supporting UML profile. The extension adds new toolbox items to the UML toolbox. More information: Visual Studio Gallery Codeplex site Blog post by Giles Davies

Send an email in WinRT

Sending emails in WinRT is easy, you only have to create a “mailto” –uri and launch it: var mail = new Uri("mailto:test@somedomain.com"); await Windows.System.Launcher.LaunchUriAsync(mail); If you also want to define a subject, body or other fields, you can further extend the querystring: var mail = new Uri("mailto:?to=test@somedomain.com&subject=Some subject&body=Some other content."); await Windows.System.Launcher.LaunchUriAsync(mail); That’s all. Not the most programmer friendly interface, but it works…

Caching images in WinRT

WinRT will out-of-the-box cache all the images you download for your. The cache will automatically be used when you set the image source to a URL: e.Source= http://somesource/aRandomImage.jpg If you set the same URL again then it will automatically use the cached image if it has already been downloaded once. But what if you don’t want this behavior? Ian Walkers blog brings us the answer: He has found that adding a dummy querystring to the BitMapImage source filename reference does the trick and also can offer precise control over the length of caching required . For example, if you want to cache your images for an hour, add the following to the image path: “?Cache=” + System.DateTime.Now.DayOfYear.ToString() + System.DateTime.Now.Hour.ToString(); The BitmapImage class also has some properties that allow us to control the caching behavior: BitmapImage bi = new BitmapImage(); // Begin initialization. bi.BeginInit(); // Set properties. bi.CacheOption = BitmapCacheOption.

Forcing a NuGet Package to update

By default NuGet skips updating a package when there is no higher version number. This brought us into trouble because we changed a package without updating the version number(only the file version had changed). So all our developers had to remove and re-install the package. Until NuGet 2.1 there was no way to force an update regardless. NuGet 2.1 addresses this with the ‘reinstall’ flag. Let’s have a look at the sample from the NuGet 2.1 release notes : Previous versions of NuGet would result in the following when attempting to update a package that did not have a more recent package version: PM> Update-Package Moq No updates available for 'Moq' in project 'MySolution.MyConsole'. With the reinstall flag, the package will be updated regardless of whether there is a newer version. PM> Update-Package Moq -Reinstall Successfully removed 'Moq 4.0.10827' from MySolution.MyConsole. Successfully uninstalled 'Moq 4.0.10827'.

My first Windows 8 app: POW! Comic Book Reader

Last week I released my first Windows 8 app: POW! Comic Book Reader . Description POW! Comic Book Reader is here to give you a great reading experience on Windows 8. Browse through your local comic books and read them using a simple and user friendly interface. Features Manage a list of recent comic books Open CBR, CBZ, RAR and Zip files Page reader Full screen mode Some screenshots

A great example of Responsive Web Design: www.microsoft.com

Maybe it’s something you would not expect but Microsoft.com is a great example of Responsive Web Design. Let’s open it up on a range of devices and just for fun we’ll do the same thing for apple.com . This is how the sites look on my 24” screen:   And this on my 15” laptop screen: And this on my 10” tablet: And this on my mobile phone: Enough said?

Team Foundation Server 2012: Multi-Proc build

When you are creating a new build definition in TFS 2012, you’ll notice that a new build setting is added to the MSBuild options: The MSBuild Multi-Proc setting allows MSBuild to build multiple projects in parallel. This setting is not new but now it’s easy accessible  without the need for extra customization. Biggest advantage of enabling this setting is speed. I noticed a big decrease in build time(for large projects) with a factor 2 to 4. Remark: Be careful when enabling this property, in some situations I started to get ‘Access Denied’ exceptions as multiple projects tried to write to the same folder concurrently.(And I noticed that I’m not the only one with problems when enabling this setting.)

WinRT: No FindSystemTimeZoneId available.

The TimeZoneInfo class in the regular .NET Framework has the FindSystemTimeZoneId method. It allows you to specify a TimeZone id and return the related time zone information. // Get Brussels Standard Time zone TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("Romance Standard Time"); A list of Time Zone id’s can be found here: http://www.xiirus.net/articles/article-_net-convert-datetime-from-one-timezone-to-another-7e44y.aspx . However if you try to execute this code in WinRT, you’ll notice that the FindSystemTimeZoneById method is not available. The reason could be found in the same MSDN documentation : “FindSystemTimeZoneById tries to match id to the subkey names of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones branch of the registry under Windows XP and Windows Vista. This branch does not necessarily contain a comprehensive list of time zone identifiers.”   I’m assuming that this registry key is not available from WinRT

Team Foundation Server add-in for Word

Last week the ALM Rangers released their first version of the Team Foundation Server Word Add-in. The add-in allows you to import work items from a Team Foundation Server Team Project and generate professional-looking Word document from TFS Work items. The add-in needs to know which fields you want to display in the document and how to place the fields of the work item in the document. This is called a Layout. The add-in installs some sample layouts to help you get started. You can customize the existing layouts or create new ones. For more information, please visit the TFS Word Add-In Codeplex project. Future Plans Visual Studio 2012 and Team Foundation Server 2012 support Bi-directional support to read work items from and write to Team Foundation Server

All training kits in a row

On June Tabadero’s blog, I found the following useful blog post : a list with all the currently available free Microsoft Developer Training Kits. Enough for months of learning… Go and have a look …

Error.stack: a JavaScript stacktrace

By default, JavaScript error handling will not give you much (extra) information. One way to get some extra info is by using the Error.stack property. Error.stack, while not a published ECMAScript 5 standard, is broadly supported on the web, and enables the developer to readily drill down into errors. This can quickly show you where the problem originated, and will help you to walk the call tree back to where the error condition began. This can be especially useful if you send the client side errors back to the server to store them somewhere and want to debug the problem later. Imagine you try to execute the following code(which will fail because d does not exist): function a() { return d; } function b() { return a() * 5; } function c() { return b() * a() * b(); } c(); If you wrap this in a try-catch block and write-out the stack trace, you’ll get the following info: a@http://localhost/ErrorStackSample/:10 b@http://localhost/ErrorStackSample/:14 c@http://localhost/Erro

What’s new in .NET Framework 4.5?

Looking for a quick and easy overview of the new features in NET Framework 4.5? Jouni Heikniemi created a poster with all the new stuff.

TFS 2012: Work Item ‘Description’ field is readonly in Excel

After upgrading to TFS 2012 users noticed that the Description field became read only in Excel. Before the migration they were able to upgrade this field in Excel without any problem.   Why is this field readonly? I found out that during the migration to TFS 2012 the ‘System.Description’ field is changed from ‘PlainText’ to ‘HTML’.  The advantage is that you now have rich text support when creating and editing the description field of your work item. The disadvantage however is that ‘HTML’ fields are not editable in Excel. More information: http://blogs.msdn.com/b/team_foundation/archive/2010/05/26/change-in-html-field-behavior-in-the-2010-tfs-excel-integration.aspx

Windows 8: Open Type Fonts are not supported

Some things you have to find out the hard way. I blogged before about how to embed a custom font in your Windows 8 application. So we followed these steps to add another font to the application, but no luck, no matter what we tried we couldn’t get it working. So what could be different from the original font we tried to embed? It took us some time to discover the one and only difference; before we were using a True Type Font(.ttf) and this was an Open Type Font(.otf). After switching to the same font in ttf format(using a converter didn’t work), our new font was finally there. Lesson learned: Open Type Fonts are not supported on Windows 8.