After some time, your TFS-Workspace can get quite crowded with files and folders which were deleted.

To clean your workspace and delete all unversioned files, navigate to a folder which is under source control and run the following command:
tfpt treeclean /exclude:*.suo,*.user /recursive
After some time, you’ll get a dialog which shows all files which will get deleted.

Sometimes after formatting a Harddrive and re-installing Windows, the NTFS-Permissions for other drives are kinda corrupted (need Admin-Rights for everything, “Unknown User” is there, …).

There is a simple command-line command you can execute to reset the permissions.

  1. Start “cmd” as Administrator
  2. Navigate to the Drive you want to reset the permissions
  3. Run the following command: icacls * /T /Q /C /RESET

After a while, your permissions are all fixed!

Source: http://lallousx86.wordpress.com/2009/06/14/resetting-ntfs-files-security-and-permission-in-windows-7/

More Info about icacls.exe

This error has greeted me several times before in the past when working with Msysgit on Windows. It alway appears for no apparent reason; sometimes from one boot to the next, and sometimes it suddenly starts happening while the system is running. Once the error is there, it stays consistently at the very least until the next reboot. Sometimes it only happens for specific commands like “git log”, sometimes it seems to affect every cygwin command.
Continue reading Msysgit couldn’t reserve space for cygwin’s heap

Yesterday, I listened to an episode of the .NET Rocks podcast featuring Scott Hanselman and Chris Sells talking about HTML and JavaScript in today’s modern web. While the episode is essentially hysterically funny and I quite like Hanselman and his (at times) extremely helpful blog posts, there is a lot in this particular episode that rubbed me the wrong way and I somehow need to get this off my chest.
Continue reading Why “Browser OS” is a stupid idea

Recently I stumbled on a piece of PowerShell syntax that confused me massively on first glance

$ some-command |% {some-expression}

It took me a while to find the documentation for that since I was of course looking in the wrong place. It looked to me like some sort of special pipe, when in fact it is just a pipe “|” followed by the ForEach-Object CmdLet which has an alias that (unfortunately) is “%”. So what was actually happening is:

$ some-command | ForEach-Object {some-expression}

For example, I used this to basically fill in some placeholders in a template file

$ Get-Content "mytemplate.txt" |% {$_ -replace "PLACEHOLDER", "42"}

Sometimes you want to step into Source Code which comes from the core components of Microsoft. You can either decompile the .Net Libraries with .Net Reflector or ILSpy or use the Microsoft Reference Source Code Packages.

The Reference Source Code allows you to directly lookup the source or even debug into the core components of Microsoft. Just download the Packages you want, install them and you’re done. You now can Debug into (F11) the source or look it up (F12).

Alternative for Visual Studio 2010
Setting up Visual Studio 2010 to step into Microsoft .NET Source Code