Thursday, September 28, 2006

Windows Live Writer - I18N not complete

After performing the usual* test when getting a System.FormatException it seems that the I18n has not yet been done properly in Windows Live Writer. Basically (it seems like) the code assumes . (dot) as a decimal separator somewhere, but gets a , (comma) since the Swedish (Finland) locale (sv-FI) uses comma as decimal separator.

Workaround: Change the decimal separator to a dot.

Usual test: Change the regional settings to use English (United States)


Technorati tags:

Hello World from Windows Live Writer

After installing the latest version of Windows Live Writer and applying the workaround for beta.blogger I'm now successfully posting from Windows Live Writer running on Vista x64 (5728)

Technorati tags: ,

Update: Did not work on first try...


System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str
, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseDouble(String value
, NumberStyles options, NumberFormatInfo numfmt)
at System.Double.Parse(String s
, NumberStyles style, NumberFormatInfo info)
at WindowsLive.Writer.BlogClient.Clients.AtomClient.ParseRfc3339(String dateTimeString)
at WindowsLive.Writer.BlogClient.Clients.AtomClient.Date(XmlNode node
, String xpath, DateTime defaultValue)
at WindowsLive.Writer.BlogClient.Clients.AtomClient.Parse(XmlElement entryNode)
at WindowsLive.Writer.BlogClient.Clients.AtomClient.NewPost(String blogId
, BlogPost post, Boolean publish)
at WindowsLive.Writer.BlogClient.Blog.NewPost(BlogPost post
, Boolean publish)
at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()

Saturday, September 23, 2006

Joke of the day

The potential effect of the recent (laptop) battery recalls is a brilliant topic for a comic

Monday, September 18, 2006

xcopy deployment deprecated

(Spotted at Channel9)

It seems that xcopy deployment just got deprecated:

>xcopy /?
Copies files and directory trees.

NOTE: Xcopy is now deprecated, please use Robocopy.

Robocopy shows:

>robocopy /?
------------------------------------------------------------------------------- ROBOCOPY :: Robust File Copy for Windows

So I guess that's the end of xcopy deployment and beginning of robocopy deployment, (or are they pushing ClickOnce deployment all the way?)

Tuesday, September 12, 2006

Oh the joys of UAC (NOT)

Tried to do a little bughunting on a WCF project, the problem specifically related to dual bindings. However, I did not get so far, since I soon found out through "trial and horror" that in Vista you are not allowed to bind to a port unless running under elevated privileges.

Yes, UAC strikes once again!

I soon found out that this is a known issue and how you should work around it. Basically you add a manifest to the exe requesting elevated privileges.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestversion="1.0">
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedexecutionlevel level="requireAdministrator">

However, I couldn't get this working under a debugger !?! (The manifest is there as both exename.exe.manifest and exename.vshost.exe.manifest)

So, how is one supposed to debug a WCF server on Vista !?!

Monday, September 11, 2006

Uninstalling Google Toolbar on Vista

I recently installed Google toolbar to get "BlogThis" functionality. Alas, I soon discovered that as I use the new beta blogger, this functionality is not supported in the current version of the toolbar :( However, more annoyingly, the toolbar seems to break the right-click context menu..

So I wanted to get rid of the toolbar as soon as possible (at least for the time being).

Now comes the big problem, the thing won't let me uninstall it, complaining about unsufficient permissions, yada yada. Basically because of UAC even though you have admin privileges you are not running with them all of the time. A properly configured installer will ask for elevated privileges, but it seems the Toolbar installer is not clever enough to do this..

So here's how you do it:
Right-click IE icon, choose "Run as Administrator", and then proceed to uninstalling the toolbar. Needless to say, it is probably safest to not go around surfing the 'net as Administrator...

Sunday, September 10, 2006

Playing around in WPF land

With a little (ok, a lot of) help from Josh Smith and Karsten Januszewski/Andrew Whiddett I managed to put together a little ComicBook application that utilizes Asynchronous databinding, animated image transitions. It's not quite finished yet, but the parts that are left should mostly be a walk in the park (i.e. known territory). Not bad for an evenings worth of work, considering this is my first "real" WPF application.

The learning curve is steep...

I probably post more technical stuff when I get it closer to what I want it to be.

Friday, September 08, 2006

Joke of the day

Ok, I admit I'm a little bit late, but I found this (Userfriendly) comic quite amusing. :-) 

Thursday, September 07, 2006

Developing WCF without Orcas CTP

For various reasons I installed the .NET 3.0 RC1 Runtime/SDK as soon as they were available. This meant that I didn't have a CTP of Orcas to go with it. As I currently don't have any WPF stuff to do I figured I'd manage just as fine without it.

However, when I started a new project using WCF it got interesting, I could build already made WCF projects, but System.ServiceModel (and System.Runtime.Serialization for that matter) was nowhere to be found in the Add reference... dialog.

As I also do fiddle around with msbuild stuff I figured that I could work around this quite easily by firing up the project xml file (right-click the project, choose Unload project, right-click the unloaded project, choose Edit .csproj, Edit away..., then right-click project, Reload project)

and add the missing reference to the project by hand

<Reference Include="System.ServiceModel" />

Still, I thought it was kinda funny that the workaround was needed.

EDIT: This is not an issue anymore since Orcas CTP for RC1 has been released.

Scoping issues in C#

Came across some "interesting" scoping rules of C# at work today.Consider the following:

try {
int answer = 42;
} catch {
// ...
int answer = 42;

This one errors out with the somewhat curious error message:
Error 1 A local variable named 'answer' cannot be declared in this scope because it would give a different meaning to 'answer', which is already used in a 'child' scope to denote something else C:\Path\To\File.cs 15 17 TheProject

Out of curiosity we tried the following:

try {
int answer = 42;
} catch {
// ...
answer = 42;

This (rightfully IMO) errors out in the following way (the same thing happens by the way if the second assignment is within the catch block):
Error 1 The name 'answer' does not exist in the current context C:\Path\To\File.cs 15 13 TheProject

Saturday, September 02, 2006

Vista RC1 is out

As Vista RC1 was released to β testers yesterday. I naturally had to get it installed right away, so currently AllThingsMedia is happily running Vista x64 build 5600. Expect a more general release of the RC1 sometime next week..