Arne Brachhold

Backup Formatting Settings of Visual Studio 2005

Filed under: .Net — arne on April 28, 2006

If you’re working in a team on a .Net project, all devs should use the same coding guidelines as well as the same code formatting. Visual Studio 2005 has powerful options to automatically format your code how you like it. Unfortunately there is no way to export this settings from Visual Studio, so every developer has to configure the formatting settings by hand.

This is not very comfortable and fail safe so there must be a way to export or backup these settings, so you can import them on an other computer or ideally set them as a group policy in Active Directory.

(Read on …)

Akismet C# API for the .Net Framework 1.1 and 2.0

Filed under: .Net, Wordpress — arne on April 18, 2006
Latest release:
1.0
2006-04-18

This is a little Microsoft .Net class which allows you to use the powerful Akismet comment spam protection in your .Net wiki/blog/website/software.

It’s well documented and available as a precompiled library or C# project. It’s compiled as .Net 1.1, but also works great with 2.0. Note that you need to obtain a WordPress.com API key to use it.

(Read on …)

M3UCOPiER (M3U to MP3 Copy Tool)

Filed under: Tools — arne on January 8, 2006
Latest release:
1.0
2006-01-08

Some months ago, I coded a small tool for my MP3 player which copies the content of a M3U list into a specified directory. This is useful if your MP3s are distributed over several folders and you use M3u files to organize them.

This tool takes one or more M3U files and copies the contained MP3 files into a directory or MP3 player. Additionally, it can rename the files to keep the correct order.

It requires the .Net Framework 1.1 which should be already installed on your computer. If not, download it at microsoft.com.

Features:

  • Takes multiple .m3u files
  • Copies the content to a specified directory (or portable device)
  • Can keep the correct order by renaming the files (like 0_1_Your first track.mp3)
  • Can create sub directories for every .m3u file
  • Full drag n’ drop support
  • Allows you to exclude files

What is a M3U file?
A .m3u file is actually a list of audio file names. It just contains the path to every MP3 or audio file as well as some additional information like artist and title. Note that the .m3u file is a text-only list and doesn’t contain any music so you still need the associated MP3 files. M3U lists are used by a large number of audio players including WinAmp or Windows Media Player.

Download:
Download Icon http://www.arnebrachhold.de/get/M3UCOPiER/M3UCOPiER.msi

(Read on …)

Custom HTTP handlers in ASP.Net (.Net 1.1)

Filed under: .Net — arne on May 25, 2005

Custom Webhandlers are an excellent method to create ASP.Net pages which don’t need all the Page and WebControl stuff. Maybe you already created a .aspx file which should only return XML or an image.

If you develop with Visual Studio, it creates automatically an .aspx and .cs file for you and you have to delete all content except the Page Directive from the .aspx file or call Response.End() at Page_Load. This is not very cool and results in useless work.
(Read on …)

Microsoft Component Installer SDK (Spring 2005)

Filed under: .Net — arne on May 24, 2005

Microsoft released the new Microsoft Component Installer Software Development Kit which is a SDK to perform various required installations for your .Net application.

The installer includes:

  • Microsoft Data Access Components (MDAC) 2.8
  • Microsoft .NET Framework 1.1
  • Microsoft DirectX 9.0c
  • Microsoft DirectX 9.0c for Managed Code
  • Microsoft .NET Framework Version 1.1 Language Pack
  • Microsoft .NET Framework 1.1 Service Pack 1
  • Microsoft ASP.NET Security Update for Microsoft .NET Framework 1.1 Service Pack 1
  • Microsoft Windows Installer 2.0
  • Microsoft Windows Installer 3.1

If you run it before your application setup, you can be sure all required components will be installed.

You can also specify an application or URL which will be executed when the installer finished. If you set the the "uionlyifneeded" parameter, the installer won’t be shown to the user if all required components are already installed.

.Net Coding Guidelines

Filed under: .Net — arne on May 23, 2005

If you code in a team, it is important that you use the same code style, especially if developers began with different languages which had individual styles. For example, PHP is often coded with camelCase and C++ developers use prefixes like strName or intZipCode.

Modern IDEs allow you to see the type of your members or variables while working with them. Visual Studio shows the type in the Intellisense window, Eclipse has a similar function for Java.

Mixing coding styles makes it hard to read the code and find members via AutoComplete.

So you should apply company-wide coding guidelines, use them and correct wrong names.

For the .Net Framework I recommend to use the Naming Guidelines for the .Net Framework. You can check your Assemblies using a tool called FxCop from GotDotNet.com. FxCop also provide checks for performance, design and security issues.

You can also specify custom rules if the existing rule library doesn’t fit your needs.

A good way to enforce coding guidelines to all developers is to add the code formatting settings to the Active Directory. These settings are saved in the registry, so you can import or export them easily.