部署的dll到GAC [英] Deploying dlls to GAC

查看:134
本文介绍了部署的dll到GAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有我们试图将部署到生产环境中的SharePoint 2010的解决方案。

We have a Sharepoint 2010 solution that we are trying to the deploy to the production environment.

我们已经开发使用Visual Studio 2010这一解决方案,我们已经创建了这导致了一些dll的几个项目。

We have developed this solution using Visual Studio 2010 and we have created several projects which result in a number of dlls.

我们正在访问的Web部件之一,当收到以下错误。

We are getting the following error when accessing one of the web parts.

所需的文件的编译过程中出现错误,或者一个   它的依赖。类型XXXX是一个组件,其定义   没有引用。您必须添加一个引用程序集XXX,   版本= 1.0.0.0,文化=中性公钥= XXXX。

An error occurred during the compilation of the requested file, or one of its dependencies. The type 'xxxx' is defined in an assembly that is not referenced. You must add a reference to assembly 'xxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxx'.

有关安装的dll - 我已经拖拽他们进入GAC。 这是一个好的方法吗?难道是这个问题的原因是什么?也许有安装到GAC的更好的办法?或者也许需要将它们安装在特定阶ΣΔ不依赖第一个?

For installing the dlls - I have dragged and dropped them into the GAC. Is this a good approach? Could it be the cause of the problem? perhaps there is a better way of installing into the GAC? Or perhaps they need to be installed in a particular order?? The one without dependencies first?

这是从日志文件的完整错误:

This is the full error from the log file:

System.Web.HttpCompileException:C:\ WINDOWS \ Microsoft.NET \ Framework64 \ V2.0.50727 \临时ASP.NET文件\ ROOT \ 6f2f2743 \ 7b5d4663 \ App_Web_rxpractioncommonwpusercontrol.ascx.12f7e65c.q7c1p6i0.0.cs(134) :错误CS0012:XXXX类型在未被引用的程序集中定义。您必须添加一个引用程序集XXXX,版本= 1.0.0.0,文化=中性公钥= fe560f99f37381ef。在System.Web.Compilation.AssemblyBuilder.Compile()在System.Web.Compilation.BuildProvidersCompiler.PerformBuild()在System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)在System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,布尔noBuild,布尔allowCrossApp,布尔allowBuildI ... a47a805d-765d-429e-B080-fe031b3e4fac

System.Web.HttpCompileException: c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\6f2f2743\7b5d4663\App_Web_rxpractioncommonwpusercontrol.ascx.12f7e65c.q7c1p6i0.0.cs(134): error CS0012: The type 'xxxx' is defined in an assembly that is not referenced. You must add a reference to assembly 'xxxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fe560f99f37381ef'. at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildI... a47a805d-765d-429e-b080-fe031b3e4fac

谢谢

约瑟夫

推荐答案

既然你提到你已经尝试从WSP部署的组件,我想我会列出另一种可能性是一个新的答案。你将需要具体哪些组件丢失首先,然后验证本次大会是present在所有前端的GAC。你需要排除的引用程序集实际上缺少任何可能性。使用融合日志查看器中提到的另一种回答。

Since you mention that you already tried deploying the assemblies from WSP, I thought I would list another possibility as a new answer. You are going to need to be specific about which assembly is missing first of all, and then validate that this assembly is present in the GAC of all your front ends. You need to rule out any possibility that the reference assembly actually is missing. Use the fusion log viewer as was mentioned in another answer.

其次,是如何被Web部件开发,并确定它的Web部件抛出的错误?具体来说,你使用任何的.ascx标记在你的Web部件引用控制了这个缺集会?如果是这样,你可能需要一定要添加一个<%@大会名称=%> 指令到您的标记,以使asp.net编译器知道到编译过程中引用它。您可能潜在地需要添加的SafeControl条目也。

Next, how was your web part developed and are you sure its the web part throwing that error? Specifically, are you using any .ascx markup in your web part to reference controls out of this 'missing' assembly? If so, you may need to be sure to add a <%@ Assembly Name="" %> directive to your markup so that the asp.net compiler knows to reference it during compilation. You may potentially need to add SafeControl entries also.

这篇关于部署的dll到GAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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