Silverlight ";CreateRiaClientFilesTask“;任务意外失败

Silverlight ";CreateRiaClientFilesTask“;任务意外失败,silverlight,wcf-ria-services,Silverlight,Wcf Ria Services,我已经安装了VS2010,最近安装了WCF RIA Services V1.0。为了进行测试,我创建了一个新的Silverligh业务项目,但每当我重建解决方案时,我都会收到以下错误: 有人知道我为什么会得到这个吗 谢谢 Error 1 The "CreateRiaClientFilesTask" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Micr

我已经安装了VS2010,最近安装了WCF RIA Services V1.0。为了进行测试,我创建了一个新的Silverligh业务项目,但每当我重建解决方案时,我都会收到以下错误:

有人知道我为什么会得到这个吗

谢谢

Error   1   The "CreateRiaClientFilesTask" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ServiceModel.DomainServices.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.ServiceModel.DomainServices.Tools, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at System.Web.Hosting.HostingEnvironment.CreateWellKnownObjectInstance(String assemblyQualifiedName, Boolean failIfExists)
   at System.Web.Hosting.HostingEnvironment.CreateWellKnownObjectInstance(String assemblyQualifiedName, Boolean failIfExists)
   at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateObjectInternal(String appId, Type type, IApplicationHost appHost, Boolean failIfExists)
   at System.Web.Compilation.ClientBuildManager.CreateObject(Type type, Boolean failIfExists)
   at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.CreateSharedTypeService(ClientBuildManager clientBuildManager, IEnumerable`1 serverAssemblies, ILogger logger)
   at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.GenerateClientProxies()
   at Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.ExecuteInternal()
   at Microsoft.ServiceModel.DomainServices.Tools.RiaClientFilesTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

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].
    BusinessApplication2

尝试删除DomainServices程序集(…引用),然后在项目上运行“Clean”,或者更好地运行整个解决方案。重新启动VS并重新添加程序集。

我使用VS 2010和Windows 7。我遇到了这个异常,在重新打开解决方案后,它再次出现。下一个对我的情况有帮助。我已经关闭VS并再次打开解决方案,但没有运行.sln文件-我使用管理员权限(不确定管理员权限确实需要)从快捷方式运行VS,并在Visual Studio的“开始”页面选择我的解决方案。之后,我重新构建了解决方案。

关闭VS,删除
c:\Windows\Microsoft.NET\Framework\v4.0.30319\临时ASP.NET文件\
中的文件。 重新启动VS,构建解决方案。
顺便说一句蓝屏后我遇到了这个问题。

我的解决方案是从配置文件中删除应用程序设置。

我发现在管理员模式下重新启动VS就足够了。

在安装WCF RIA V1.0 SP1后,问题就消失了。

我在新的工作计算机上遇到这个问题已经好几个月了,由于我的防病毒软件使我的机器速度减慢(管理员安装了McAfee而不是我的选择),我对此感到沮丧,于是我删除了它,瞧,我停止了CreateRiaClientFilesTask错误。这似乎有一百万个不同的原因,但这对我来说确实有效,我现在使用的是未安装在Windows上的bog标准Microsoft防病毒软件,但如果您在Windows 7安全部分中注意到该软件没有安装防病毒软件,则可以找到该软件。

我在McAfee和Rob中遇到了同样的问题,但我没有删除它,而是关闭了“实时扫描”受病毒和间谍软件保护,防火墙受网络和电子邮件保护。此设置仅在生成项目期间是临时的。

我在TFS生成服务器上遇到此错误,但在开发计算机上没有

事实证明,这是因为我的开发箱中有MS14-059安全更新(即该更新),我在构建机器上通过更新我的项目以使用Microsoft.AspNet.Mvc NuGet包,而不是引用GAC中的3.0.0.0程序集,对其进行了修复。另一方面,生成服务器没有安装MS14-059。因此,我的项目引用了System.Web.Mvc版本3.0.0.1,但构建服务器的GAC中只有3.0.0.0

我运行了
gacutil-l | find/I“mvc”
来验证我的开发机器的GAC中有System.Web.mvc 3.0.0.1,而构建服务器只有3.0.0.0

当我升级到NuGet包时,它向我的web.config添加了绑定重定向,因此该项目可能在构建服务器上运行良好。但是RIA服务的msbuild任务在构建时运行,不关心web.config中的绑定重定向,在版本不匹配的情况下运行得不太好


修复方法是在构建机器上进行。

这发生在我从MVC3升级到MVC5时。MVC5在web.config的不同位置列出了相关程序集。在web.config中查找
部分并对其进行注释(即使它是正确的版本)

我发现,如果您构建项目或重新构建项目,将减少错误发生的次数。在出现蓝屏后,我也遇到了问题,而且修复对我也有效!感谢您为我节省了一些时间。在我的情况下,临时文件位于以下目录中:C:\Users\myUserName\AppData\Local\Temp\temporary ASP.NET文件在我的情况下,它是关于1)蓝屏2)关于CreateRiaClientFilesTask的错误被引用到Micrisift.Practices.Unity.Interception.dll,但这个解决方案太棒了!非常感谢。可能位置已更改,但我必须删除子目录
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs
,同时以管理模式运行Visual Studio 2013。我们的团队正在使用SP2,因此出现了此问题。Øyvind的解决方案对我们有效。