Build/Test Issues

Unable to parse the configuration setting Text output font (after upgrade to v3)

Started by abelb on 5,857 views

After I upgraded my 2.x to the current 3.x I first got the "first time" wizard again and after it finished, the NCrunch Tests window shows:

The setting 'TextOutputFont' as declared in 'R:\AppData\NCrunch\globalconfig.crunch.v3.xml' could not be read by NCrunch. The default value will be used instead


Nevertheless, it "just runs" the tests after build. I do see a different font in my output window (I remember to have changed it previously because the default cannot display underscores).

It's a minor error and I can probably fix it easily, but I thought I report it anyway as it may be the result of trying to convert the old config files to the new XML format. The relevant line in the XML looks as follows:

<TextOutputFont>Source Code Pro, 8,25pt, 0</TextOutputFont>


And as an aside: I like the new format a lot! The new configuration system, esp. the Advanced setting, is awesome!!!

Edited

Hi,

Thanks for sharing this problem. This actually looks to be a localization issue. Your locale has a comma in the font point size, and NCrunch isn't handling this well. I'll see what I can do about rolling a fix into the next version.

I'm glad you like the new config system!
Thanks for your quick response (as always!). The issue may be a tad larger than I thought at first (meaning, I noticed a few behaviors that may happen with other errors as well, in particular, the error staying). I tried a few things:

[list=1]
  • Indeed, the error (re)appears with font-sizes that end up with fractions in the XML (though the font select box doesn't show these)
  • Clearing the font (hit the red cross), the error stays, though the line in the physical file is gone
  • Error only disappears after Disabling/Enabling NCrunch, or restart VS2015
  • Selecting *any* other font, the error stays
  • Selecting a font with a size that doesn't include the localized comma, still shows the error, but not after restart
  • Error or not, the font is correctly displayed, both size and face


  • All of the above appeared to be reproducible multiple times. I'll be happy to try out your next version, if you have found the time to come up with a fix (sure you'll store it with InvariantCulture or something).
    Thanks for the extra details! My guess is that the conversion/parsing issue is throwing out a few things further up the stack. I'll try to get this fixed.
    One more thing I just noticed, this particular font (Source Code Pro) gets stored with a double-value of 8.99999 (with the comma, of course), whereas for instance Arial gets stored as 9 points. Not sure this helps, but just noticed it and thought I'd share it:

    <TextOutputFont>Source Code Pro, 8,999999pt, 0</TextOutputFont>
    abelb wrote:
    <TextOutputFont>Source Code Pro, 8,999999pt, 0</TextOutputFont>


    Thanks again, I'll take a look at this when addressing the localization issue here.

    Post a reply

    Log in to reply.