WP8项目:“CompileXaml”任务意外失败

我在我的计算机上重新安装了Windows,在Visual Studio 2012 for Windows Phone中打开任何Windows Phone 8项目后,收到以下错误消息:

The "CompileXaml" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'XamlServicesWP, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the specified file. File name: 'XamlServicesWP, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Server stack trace: at Microsoft.Silverlight.Build.Tasks.CompileXaml.GenerateCode(ITaskItem item, Boolean isApplication) at Microsoft.Silverlight.Build.Tasks.CompileXaml.Execute() at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.Build.Framework.ITask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. MyProject 

我尝试重新安装Visual Studio两次,但它没有解决它..

我怎么解决这个问题?

安装Visual Studio 2012 Update 4 ,然后安装Phone SDK的最新更新 。

起源。

对于那些在Visual Studio 2013中遇到此问题的人 – 尝试安装Visual Studio 2013 Update 4.有时候MSBuild会出现一些问题,重新安装会有所帮助。