我就勾了下这个 就出这问题了 现在取消也没用了 彻底悲剧
错误 1 “CreateRiaClientFilesTask”任务意外失败。System.Web.HttpException (0x80004005): 未能加载文件或程序集“CHCGIS.Web”或它的某一个依赖项。试图加载格式不正确的程序。 ---> System.Configuration.ConfigurationErrorsException: 未能加载文件或程序集“CHCGIS.Web”或它的某一个依赖项。试图加载格式不正确的程序。 ---> System.BadImageFormatException: 未能加载文件或程序集“CHCGIS.Web”或它的某一个依赖项。试图加载格式不正确的程序。 在 System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) 在 System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) 在 System.Reflection.Assembly.Load(String assemblyString) 在 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String http://assemblyName, Boolean starDirective) --- 内部异常堆栈跟踪的结尾 --- 在 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) 在 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() 在 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) 在 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) 在 System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() 在 System.Web.Compilation.BuildManager.CallPreStartInitMethods() 在 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) 在 System.Web.Compilation.ClientBuildManager.EnsureHostCreated() 在 System.Web.Compilation.ClientBuildManager.CreateObject(Type type, Boolean failIfExists) 在 Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.GenerateClientProxies() 在 Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.ExecuteInternal() 在 Microsoft.ServiceModel.DomainServices.Tools.RiaClientFilesTask.Execute() 在 Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() 在 Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult) CHCGIS
网上也没找到类似的问题,悲剧啊
弄了半天 最后通过群友 找到了解决办法
![](https://img-my.csdn.net/uploads/201212/17/1355736297_8058.jpg)
修改为X86就不报错了
见供参考,不一定每个人都有效。