如何从服务器GAC删除.NET程序集DLL [英] How to remove .NET assembly DLLs from server GAC

查看:99
本文介绍了如何从服务器GAC删除.NET程序集DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将包含Oracle ODP.NET库的VS2013项目部署到Windows 2008 IIS服务器,并收到错误无法从程序集"Oracle.ManagedDataAccess,版本"加载类型"OracleInternal.Common.ConfigBaseClass" = 4.121.2.0.'根据我在网上发现的情况,这是由项目的ODP与GAC中具有ODP的服务器之间的冲突引起的.然后,说明要从GAC中删除ODP.服务器上GAC中有Oracle DLL.我们有99%的把握是,DLL会在GAC中绕过,因为之前的尝试是在不久之前在该框上设置Oracle的,因为该服务器上没有其他项目可以使用Oracle.因此,我们应该安全地从GAC中删除它.

I'm trying to deploy a VS2013 project containing the Oracle ODP.NET library to a Windows 2008 IIS server, and receive an error "Could not load type 'OracleInternal.Common.ConfigBaseClass' from assembly 'Oracle.ManagedDataAccess, Version=4.121.2.0.'" From what I've found online this is caused by a conflict between the project's ODP and the server having ODP in the GAC. Instructions are then to remove ODP from the GAC. There are Oracle DLLs in the GAC on the server. We are 99% certain that the DLLs wound up in the GAC from a prior attempt to set up Oracle on that box a while back, as no other projects on that server should be using Oracle. So we should be safe removing it from the GAC.

但是,gacutil.exe仅在Visual Studio中可用,并且我们不允许将Visual Studio安装到服务器上.

However, gacutil.exe is only available in Visual Studio, and we are not allowed to install Visual Studio onto the server.

那么,如何在服务器上没有gacutil.exe的情况下从GAC卸载Oracle DLL?我们可以从目录中删除它们吗?还是我们需要将gacutil.exe从我的工作站复制到服务器上才能执行此操作?还是有另一种方法? (最好不涉及注册表编辑)

So how do we uninstall the Oracle DLLs from the GAC without having gacutil.exe available on the server? Can we just delete them from the directory? Or do we need to copy over gacutil.exe from my workstation to the server in order to do this? Or is there another approach? (preferably not involving registry edits)

任何建议,谢谢.

推荐答案

如果您具有管理员权限,则可以使用Windows界面进行操作,如下所示.

You should be able to do it from using the Windows interface as follows providing you have administrator privileges.

  1. 导航到位于%systemdrive%\ Windows \ Assembly上的GAC.

  1. Navigate to the GAC, which is located at %systemdrive%\Windows\Assembly.

右键单击应用程序中包含的每个程序集文件,单击卸载",然后单击是"确认

Right-click each assembly file that is included in your application, click Uninstall, and then click Yes to confirm

如果无法通过上述方法卸载dll,则可以通过打开运行命令并输入以下路径并按Enter键来访问GAC文件夹而无需特殊视图.

If you are unable to uninstall the dlls via the above method you can access the GAC folder without the special view by opening a run command and entering the path below and hitting enter.

C:\Windows\assembly\GAC_MSIL

这将允许您与普通文件夹中的GAC中的所有文件进行交互.

This will allow you to interact with all the files in the GAC as a normal folder.

这篇关于如何从服务器GAC删除.NET程序集DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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