If you install the Visual Studio 11 Preview release on a machine that has .NET 4 Platform Update 1 installed you will find that projects targeting .NET 4 Platform Update 1 will fail to build properly. The error you will get is
'System.Activities.XamlIntegration.ActivityXamlServices' does not contain a definition for 'InitializeComponent'
The bug has been fixed and will not be a problem in the Visual Studio 11 Beta release but until then you should not install the Visual Studio 11 Preview release on development machines where you need to build projects targeting .NET 4 Platform Update 1.
The cause of the error is that the build targets file for .NET 4.5 is incorrectly imported when building projects targeting .NET Framework 4.0.1. The file in question is Microsoft.Common.Targets.
This file is deployed with the .NET Framework so you will find it under
The line that causes the problem is line 4914
<Import Project="$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets" Condition="('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v4.0') and Exists('$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets')"/>
Warning! If you screw up this file your projects won’t build. Be sure to make a backup.
<Import Project="$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets" Condition="('$(TargetFrameworkVersion)' != 'v2.0' and '$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v4.0' and '$(TargetFrameworkVersion)' != 'v4.0.1') and Exists('$(MSBuildToolsPath)\Microsoft.WorkflowBuildExtensions.targets')"/>
If Visual Studio is running while you make this change you will need to restart Visual Studio.
Happy Coding! Ron Jacobs http://www.ronjacobs.com