I’ve been doing some development recently with Visual Studio 2010 Beta 1 and because of this I ran across a bug in .NET 4.0 Beta 1:
This cropped up when I decided to introduce logging into my application using the Microsoft Enterprise Library. I soon found out that the current version of the Enterprise Library will not work with .NET 4.0 Beta 1 due to an existing bug.
The quick fix to this is to make sure your project is targeting .NET 3.5 SP1, which my project already was. After some more digging around I realized that though I was targeting 3.5, Visual Studio was hosting my WCF service using its .NET 4.0 version of WcfSvcHost.exe.
The workaround that I’ve created involves pointing my project to the VS 2008 version of the WCF Service Host for debugging purposes:
The external program path I’m using is “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\WcfSvcHost.exe”, though your path may vary. I set the working directory to my project’s debug directory.
Here is the direct link to the Microsoft Connect bug report in case you want to validate it or vote it up.