I'm building a modular WPF application. Each screen is a highly independent and isolated unit. The only thing shared - shell and a common library with a facade interface for the reusable services (message bus, persistence, window management etc).
Since the modules are loosely coupled it doesn't make sense to retest everything when a single module changed. I want to test only what's changed. If there is a change in a common library - everything should be retested.
From a source control diff you can easily get a list of files changed and thus resolve the projects affected (csproj files has all the files to compile listed). You can also resolve the project dependencies from the csproj files (who's using it, who's affected). All this info should be enough to tell what actually needs testing. So the problem sounds solvable.
Has anyone done this with TeamCity? Any suggestions? I saw there is a solution for Java folks: http://blog.jetbrains.com/teamcity/2012/03/incremental-testing-with-teamcity/
What about the .net realm?