I am so disappointed with TFS 2010. Ok, the new functions are really cool but NO tooling for migrating existing projects. Microsoft – what were you thinking? I suppose that it would be a little task for a TFS engineer to create a migration tool. Now we have to fiddle with it.
Here is the deal: [...]
The Microsoft unit testing framework comes with the MSTest.exe to run tests from command-line. This only works on machines that have Visual Studio installed. With some tweaks you can make it run on a computer without Visual Studio (see here). But that requires to add some keys to the registry and copying a bunch of [...]
Ok, validating an email address should not be difficult. You look up the definition in the RFC and write a little regular expression. Here is what I could extract from RFC 822:
address = mailbox ; one addressee / group ; named list mailbox [...]
My favourite way to clean up database tables is with a little stored procedures that runs from an async database command. It is a bit old fashioned but LinqToSql does not have any built-in async support. I want avoid that the clean-up tasks uses processing time of my application.
To create the async command I need [...]
Here is a suggestion on how you easily can create integration tests when working with LINQ to SQL and the MSTest unit test framework. I use transactions to roll-back the changes made during the test run. The preparation of the data context and the clean-up is done once for all tests. This is not a [...]
I like working with unit tests but I find it quite hard to implement fast and isolated tests in real world software. I got some great guidance on this topic attending this years EMEA Tech Ed.
Pass dependent classes via constructor. When this gets too much, because you end up with really long constructors you should [...]
I used Linq first time in my life this week – wow! It creates some trouble for my brain to write lambda expressions but I am getting the hang of it.
I noticed one odd thing so far. Using Linq to SQL to map to a table with a nullable foreign key column gives you a [...]
It can be a cumbersome task to parse HTML files into some kind of .NET object structure. The trouble with HTML files is that they usually are not valid XHTML and thereby do not comply to the XML standard. There is a great toolkit avaible that accomplishes this task. It is called HtmlAgilityPack.
What it does [...]
Testing device filters on a mobile form I encountered the following error:
Can find neither a device capability named ‘IsNotMobile’ nor a public non-static method on the page named ‘IsNotMobile’ that returns a System.Boolean and takes System.Web.Mobile.MobileCapabilities and System.String as arguments.
I check the web.config and figured that the deviceFilters were properly declared:
<filter name="IsMobile" compare="IsMobileDevice" argument="true" [...]
Trying to use my first webpart I got this unfriendly error message from the run-time:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, [...]