我正在使用Visual Studio 2015 Update3。“CompileXaml”任务在Silverlight项目中意外失败
我的解决方案包含.NET Framework 4项目和silverlight项目。 当我尝试构建silverlight项目, 我得到这样的错误。
我读这篇文章 Cannot find System.Xaml? 并发现我应该瞄准.net 3.5,但我怎么能为silverlight项目做?
"CompileXaml" task failed unexpectedly.
System.IO.FileNotFoundException: file or assembly 'XamlServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'XamlServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 'XamlServices, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Server stack trace:
Microsoft.Silverlight.Build.Tasks.CompileXaml.GenerateCode(ITaskItem item, Boolean isApplication)
Microsoft.Silverlight.Build.Tasks.CompileXaml.Execute()
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
Microsoft.Build.Framework.ITask.Execute()
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()