Office 2007 seems to get confused if you install a language version different from the language Windows uses. I recently installed an English version of Windows 7 after having used a German version of Vista for two years. When I installed Office 2007 (German) on Windows 7 I realized that several gallery items in Word were missing:
I reinstalled Office without success. On the web I found some forum threads (e.g. here) describing the same issue but the most common solution was to delete a file called Building Blocks.dotx in %appdata%\Microsoft\Document Building Blocks\<some language id>. “some language id” is 1031 (German) in my case. However, deleting the file did not fix the issue. As predicted the file got recreated when Word was started, but the gallery items were still gone.
Out of the blue I guessed that maybe there was an issue with me using an English Windows and a German Office. So I copied the Building Blocks.dotx from the 1031 subfolder to a new folder named 1033 (which is the language code for English). And what can I say – it worked again!

If you’ve ever put a project on GitHub you probably know that a README file in the root folder is automatically formatted and displayed at the project page. GitHub supports different markups for this purpose, such as Markdown, RDoc, Textile or reStructured Text.
I realized that it might come in handy to have a preview of what such a file would look like when rendered to HTML while editing it. That’s what I created my little toy project Markup Preview for. It’s a pretty simply web app which allows you to enter your markup (currently only Markdown and Textile are supported) on the left pane and see the rendered result immediately (well, almost) at the right pane.
I know that there are plenty of online converters for Markdown and Textile. Anyway, this one was fun to do, plus it adds kind-of realtime preview which is not common for those converters.
Here’s what it looks like in action (rendering its own README.md file):
I installed the app at http://markup.andreloker.de so feel free to give it a try.
The project is open source and available at GitHub.com. Feedback is appreciated.
I noticed an interesting detail in the way XmlSerializer handles collection properties. FxCop rule CA2227 suggest to make collection properties read-only, because XmlSerializer is treating collections differently as described here (scroll down to the “Note” box under “Overriding Default Serialization”). When I tried to serialize the following class, however, I got an error during serialization:
1: public class SomeClass
2: {
3: public SomeClass()
4: {
5: CollectionProperty = new List<int>();
6: }
7:
8: public List<int> CollectionProperty { get; private set; }
9: }
The error was something like:
System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0200: Property or indexer 'SomeClass.CollectionProperty' cannot be assigned to — it is read only.
Erm, right, I made it read-only because FxCop suggested it, so what’s wrong here? The answer is that “making the collection property read-only” should be read as “don’t provide a setter of any visibility”, because technically a property with a private setter is still writable, albeit from within the class only, leading to the runtime error as described above. FxCop on the other hand will stop complaining as soon as the setter is made private.
As soon as I changed the automatic property to a property with backing field without a setter the application ran fine:
1: public class SomeClass
2: {
3: private readonly List<int> collectionProperty;
4:
5: public SomeClass()
6: {
7: collectionProperty = new List<int>();
8: }
9:
10: public List<int> CollectionProperty
11: {
12: get { return collectionProperty; }
13: }
14: }
In der heutigen Folge werden wir tracd, den Trac-Dämon, als Windows-Dienst installieren, um nicht ständig am Server eingelogt sein zu müssen.
Links
Nachdem wir beim vorigen Mal Trac installiert haben, geht es nun darum, Trac in den IIS zu installieren.
Links:
Weitere info
Inhalt der isapi_redirect.properties
extension_uri=/ajp/isapi_redirect.dll
log_file=C:\trac\connector\isapi_redirect.log
log_level=info
worker_file=C:\trac\connector\workers.properties
worker_mount_file=C:\trac\connector\uriworkermap.properties
Inhalt der workers.properties
worker.list=trac
worker.trac.type=ajp13
worker.trac.host=localhost
worker.trac.port=8009
worker.trac.socket_keepalive=0
Inhalt der uriworkermap.properties
/trac/*=trac
Aufruf des Trac-Dämons für die IIS Integration
tracd -p 8009 -e c:\trac\projects --basic-auth "*",c:\Repositories\htpasswd, –unquote --protocol ajp --base-path trac/