Thursday, April 29, 2010

Using .NET: Tame Your Software Dependencies for Flexible Apps

It's from Microsoft, right, so it must be authoritative?

This uses Castle Windsor and Binsor, a Boo (!) DSL for wiring up dependencies.

Using .NET: Tame Your Software Dependencies for Flexible Apps

Wednesday, April 21, 2010

Git autocrlf problem revisited -- and solved!

Sometimes when switching from one branch to another, Git will pick a seemingly random set of files and complain that they've changed, when it's just line endings that apparently it doesn't like. The key symptom here is that "git diff" shows a ton of files whose entire contents have changed, while "git diff -w" shows no changes in those same files.

The following commands, issued in a row, will work:

git add -u
git config core.autocrlf false
git reset
git config --unset core.autocrlf


This assumes that you've got core.autocrlf normally on by default in the global settings file. If you do not, then replace the last line with the following:

git config core.autocrlf true

Or, to consolidate in one command, the first version is:

git add -u && git config core.autocrlf false && git reset && git config --unset core.autocrlf

while the second is:

git add -u && git config core.autocrlf false && git reset && git config core.autocrlf true

Reblog this post [with Zemanta]

MSLinqToSQLGenerator fails when there's a partial class having a Using at the top of the file | Microsoft Connect

Finally. Resolution!

MSLinqToSQLGenerator fails with partial class having a Using at the top of the file | Microsoft Connect: "If you add a partial class declaration to a Linq-To-SQL Data Classes context object, and then put a 'using' statement at the top of the file outside the namespace declaration, the following error occurs when you run the custom tool:

'The custom tool 'MSLinqToSQLGenerator' failed. Unspecified error'

Also, Visual Studio will then delete the corresponding '.designer.cs' file for your data context and nothing will compile after that point."

Thursday, April 01, 2010