Thursday, August 27, 2009

Beware of the dot when parsing XAML

"." != ","

As I was working today on some dynamic datatemplates, I encountered a strange XamlParseException. For one or other strange reason a custom XAML file couldn't be parsed by  the XAML engine. After some investigation, I could trace the source of my problem to some positioning coordinates I provided in my code. If I removed it, everything worked nicely.
So what was the reason? I'm working at a Belgium company where all the environments are in Dutch. Where in America a '.' is used as a decimal separator, in Belgium we're using the ','.  Luckily for us, some other people encountered the same issue and Microsoft provided a hotfix.
Thank you, Microsoft!

Disable workitem creation on build failure

By default in Team Build 2008 a workitem is created when a build fails. Because we're using continuous integration, a lot's of build are triggered before a failure is fixed. This means we mostly end up with a lot of workitems pointing at the same problem. And as all this workitems are assigned to me, I want to get rid of it ;-)
Removing the creation is actually quit easy. Open your TFSBuild.proj file and inside the PropertyGroup add the following line <SkipWorkItemCreation>true</SkipWorkItemCreation>

VSTS Team Build Failure when using click-once

As I arrived at work today, I found a build FAILED report in my inbox. Not the best way to start a working day...
Looking at the build report I saw following error:
c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1805,7): error MSB4018: The "ResolveKeySource" task failed unexpectedly.
System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Microsoft.Build.Tasks.ResolveKeySource.ResolveManifestKey()
at Microsoft.Build.Tasks.ResolveKeySource.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)

After some digging into the issue, I found out that the failure was caused by a certificate we were using to sign our click-once assemblies. This certificate is protected by a key. The first time you trigger a build, you'll be prompted with the question to provide the key. Because Team Build is triggered in a non-UI fashion, an error happens when MSBuild tries to popup a window.
The easiest way to solve this is:
- Logon to the build machine using the build service account
- Run msbuild on any project that uses this signing key. It will prompt for the password and will export the key.
- Now start the TeamBuild full build.
That's all!

Tuesday, August 25, 2009

I need a makeover


I started this blog with a default 'green' style. After looking at it for only 5 seconds, my eyes started to hurt. So my first action will be to get rid of this ugly(sorry for the CSS guru who created it) look and feel.



I want to google myself...

After long doubt, much hesitation and lot of excuses like lack of inspiration etc... I finally decided to join the blogosphere. Some say I'm joining the club after the hype, but after several years, it seems that blogging will not be gone that fast.


So why start blogging? Actually one good reason ;-), I want to google myself (or should I say bing myself). Anyway we'll see where this brings us and hopefully I can come back to this blog in many years and laugh with all the silly issues I was facing in 'the days'.

No promises about future posts and certainly not about posting frequently, but I will surely talk about one of my passions: technology and everything around it.


This blog is mainly written for myself but if you enjoy reading it, you're more then welcome.