ESRI, did you know that your .NET development samples do not work on 64 bit machines?
They do not work because the project file (e.g. csproj) references ESRIRegAsm in the wrong location.
When I run the "set" command from a DOS window to show the environment variables on a 64 bit machine, this is a subset of what I see:
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
The problem is that ESRIRegAsm is not in CommonProgramFiles but rather CommonProgramFiles(x86).
In case it matters, the version of Visual Studio that I am using is 2010. Perhaps that is the issue because 2010 uses MSBUILD? Does 2010 on a 64 bit OS work for you? What does it say when you run set" from the command line?