System.BadImageFormatException:无法加载文件或程序集"Microsoft.Sharepoint.Sandbox" [英] System.BadImageFormatException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox'

查看:84
本文介绍了System.BadImageFormatException:无法加载文件或程序集"Microsoft.Sharepoint.Sandbox"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用VS2010SP1访问我的.Net/Silverlight 4.0应用程序中的SharePoint 2010列表,但无法构建它.有任何想法吗?这是调用栈的一部分:

Trying to access a SharePoint 2010 list in my .Net/Silverlight 4.0 app using VS2010SP1, but can't get it to build. Any ideas? Here's part of the callstack:

MainResourcesGeneration:
跳过目标"MainResourcesGeneration"因为所有输出文件都相对于输入文件是最新的.
GenerateTargetFrameworkMonikerAttribute:
跳过目标"GenerateTargetFrameworkMonikerAttribute";因为所有输出文件都相对于输入文件是最新的.
CreateRiaClientFiles:
 从项目"KPIAlgoSetter.csproj"开始生成RIA客户端代理类.
C:\ Program Files(x86)\ MSBuild \ Microsoft \ Silverlight \ v4.0 \ Microsoft.Ria.Client.targets(303,5):错误MSB4018:"CreateRiaClientFilesTask"任务意外失败. [C:\ SourceControlledSolutions \ KPIToolsForCPX \ KPIAdminTool \ KPIAlgoSetter \ KPIAlgoSetter.csproj]
C:\ Program Files(x86)\ MSBuild \ Microsoft \ Silverlight \ v4.0 \ Microsoft.Ria.Client.targets(303,5):错误MSB4018:System.Web.HttpException(0x80004005):无法加载文件或程序集"Microsoft.Sharepoint.Sandbox"或其依赖项之一.尝试过 加载格式不正确的程序. ---> System.Configuration.ConfigurationErrorsException:无法加载文件或程序集"Microsoft.Sharepoint.Sandbox"或其依赖项之一.试图加载格式不正确的程序. ---> System.BadImageFormatException:无法加载文件或程序集"Microsoft.Sharepoint.Sandbox"或其依赖项之一.试图加载格式不正确的程序. [C:\ SourceControlledSolutions \ KPIToolsForCPX \ KPIAdminTool \ KPIAlgoSetter \ KPIAlgoSetter.csproj]
C:\ Program Files(x86)\ MSBuild \ Microsoft \ Silverlight \ v4.0 \ Microsoft.Ria.Client.targets(303,5):错误MSB4018:在System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName,String codeBase,证据assemblySecurity,RuntimeAssembly locationHint, StackCrawlMark& stackMark,布尔值throwOnFileNotFound,布尔值用于自省,布尔值抑制SecurityChecks)[C:\ SourceControlledSolutions \ KPIToolsForCPX \ KPIAdminTool \ KPIAlgoSetter \ KPIAlgoSetter.csproj]

MainResourcesGeneration:
Skipping target "MainResourcesGeneration" because all output files are up-to-date with respect to the input files.
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CreateRiaClientFiles:
  RIA client proxy class generation starting for project 'KPIAlgoSetter.csproj'.
C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Ria.Client.targets(303,5): error MSB4018: The "CreateRiaClientFilesTask" task failed unexpectedly. [C:\SourceControlledSolutions\KPIToolsForCPX\KPIAdminTool\KPIAlgoSetter\KPIAlgoSetter.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Ria.Client.targets(303,5): error MSB4018: System.Web.HttpException (0x80004005): Could not load file or assembly 'Microsoft.Sharepoint.Sandbox' or one of its dependencies. An attempt was made to load a program with an incorrect format. ---> System.Configuration.ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox' or one of its dependencies. An attempt was made to load a program with an incorrect format. ---> System.BadImageFormatException: Could not load file or assembly 'Microsoft.Sharepoint.Sandbox' or one of its dependencies. An attempt was made to load a program with an incorrect format. [C:\SourceControlledSolutions\KPIToolsForCPX\KPIAdminTool\KPIAlgoSetter\KPIAlgoSetter.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v4.0\Microsoft.Ria.Client.targets(303,5): error MSB4018:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) [C:\SourceControlledSolutions\KPIToolsForCPX\KPIAdminTool\KPIAlgoSetter\KPIAlgoSetter.csproj]

AskMarkus

AskMarkus

推荐答案

嗨问号,

此问题可能是由于未在全局程序集缓存(GAC)中安装引用的程序集引起的.

This issue maybe cause by the referenced assembly has not been installed in the global assembly cache (GAC).

您可以从以下网址了解如何处理它: http://msdn.microsoft.com/en-us/library/aa337405(v=SQL.90).aspx

And you can learn how to deal with it from:http://msdn.microsoft.com/en-us/library/aa337405(v=SQL.90).aspx

最诚挚的问候,

自我


这篇关于System.BadImageFormatException:无法加载文件或程序集"Microsoft.Sharepoint.Sandbox"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆