Monday, November 30, 2009

MeasureUp FAIL

I’m currently studying for the 70-536 on my way towards MCTS certification.

I have the self-paced training kit and thought I’d do the Training Kit Exam Prep “Powered by MeasureUp”

Things go without technical issues until I get to scoring.

Then I am greeted with:

---------------------------
Application Message
---------------------------
An unanticipated error has occurred in the application.InsertScoreHistory

[Microsoft OLE DB Provider for ODBC Drivers] [3604] [Microsoft][ODBC Microsoft Access Driver] Syntax error in date in query expression '#30.11.2009 21:51:40#'.
---------------------------
OK   Cancel  
---------------------------

Trying to review a particular answer fails with:

---------------------------
Application Message
---------------------------
An unanticipated error has occurred in the application.GoToQuestionSelected

[Microsoft.VisualBasic] [13] Conversion from string "7." to type 'Short' is not valid.
---------------------------
OK   Cancel  
---------------------------

I then eventually end up at the FAQ page at MeasureUp and find

I'm receiving Error: Mismatch 13.
In order for tests to display correctly, your computer's regional settings should be set to English (United States).

In the control panel, please double click on the icon labeled Regional Settings. Please choose English (United States), and click the box that says "use default properties for this input locale."

Alternatively, in the regional settings, look at the Currency tab. If it is set the decimal symbol to . (dot) instead of , (coma), that may be enough to get it working properly.

If the trouble persists, try setting the keyboard language layout to English (United States). In the control panel, double click on the icon labeled "Keyboard". Then click on the tab labeled input locales. Select the Add button. And then choose English (United States) as the input locale.

W T F !?!

It’s kinda ironic that one of the skills measured is “Implementing globalization, … in a .NET Framework application”

What’s even more tragic is that if I actually DO change to en-us, trying to start a new test fails, this time with:

---------------------------
Application Message
---------------------------
An unanticipated error has occurred in the application.PreviousSessionTestRecord

[Microsoft.VisualBasic] [13] Conversion from string "30.11.2009 21:58:26" to type 'Date' is not valid.
---------------------------
OK   Cancel  
---------------------------

Tuesday, November 10, 2009

roleProvider app.config parsing troubles

I recently had the pleasure of trying to get our RC out the door, while doing that we realized that for whatever reason, Microsoft seems to use a non-standard parser for the app.config file.

Basically this does not work:

<system.web>
  <
roleManager defaultProvider="MyCustomProvider" enabled="true">
    <
providers>
      <
clear></clear>
      <
add name="MyCustomProvider" type="Namespace.MyCustomProvider, MyAssembly"/>
    </
providers>
  </
roleManager>
</
system.web>

While this does:

<system.web>
  <
roleManager defaultProvider="MyCustomProvider" enabled="true">
    <
providers>
      <
clear/>
      <
add name="MyCustomProvider" type="Namespace.MyCustomProvider, MyAssembly"/>
    </
providers>
  </
roleManager>
</
system.web>

Of course, the well known commercial installer making tool we are using insists of creating the former… :(

A workaround is to throw the file through an identity XSLT transform in a custom tool / custom action run after custom actions from said vendor have done their job.

Oh, the bug reported on connect is already closed as Won’t Fix

Wednesday, September 02, 2009

Windows Live Movie Maker - FAIL

As I wanted to edit some movies, and Windows 7 no longer includes Windows Movie Maker I had to give Windows Live Movie Maker a try, as based on the name you’d assume it does something similar?

Turns out I was wrong. This application seems to be geared towards dropping a number of photos and creating a “movie” and not actually editing movies.

While you can import video from a DV camera, it does not split the imported video into scenes, instead it chops it into pieces, the size of which you can determine by dragging a slider !?! And to make matters worse, it does not bother to extract thumbnails from the individual pieces but instead uses what seems to be the first frame of the entire movie. Good luck finding the pieces you need.

Of course, the timeline also seemed unnecessary to include …

Time to look for a Video editor, Windows Live Movie Maker is not one.

</rant>

Tuesday, March 03, 2009

Generating GUIDs

This may seem trivial but here we go:

I recently created an installer with WIX and obviously had to create a number of GUIDs along the way. While there is a "Create GUID" option in the Tools menu it has a number of drawbacks:

  • Clicking around a UI with a mouse is not the most efficient thing in the world
  • There is not an immediately suitable format available, registry format is closest, but braces need to be removed and the rest uppercased

The obvious? solution to this problem is to create a macro like the following:

Public Sub CreateWixGuid()
Dim g As Guid = Guid.NewGuid()
Dim textSelection As EnvDTE.TextSelection

textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)
textSelection.Text = g.ToString("D").ToUpper()
End Sub


and assign a keyboard shortcut to it (I chose Ctrl+G,Ctrl+G), and voilà a GUID in the correct format is generated and inserted.