global-assembly-cache

How to programmatically determine if .NET assembly is installed in GAC?

﹥>﹥吖頭↗ 提交于 2019-12-18 12:28:50
问题 What's the easiest way to check programmatically if an assembly is registered in the GAC (Global Assembly Cache) on the local machine? Is there some easy to use .NET API where I can give it a location to an assembly DLL or an Assembly object itself to check if it exists in GAC on the local machine? In my case the assembly I'm checking will already be loaded in the current AppDomain of the program checking so I'm not sure calling Assembly.ReflectionOnlyLoad and catching an exception will work

Do I ever really need to use the Global Assembly Cache (GAC)?

送分小仙女□ 提交于 2019-12-12 16:31:28
问题 I've been building .NET web applications for many years now, and I never use the GAC? What am I missing? Or am I better off staying away from it? 回答1: The GAC is only useful if you register libraries which you're going to reuse. It is in no way obligatory to use to run a WebApp without shared libraries . 回答2: The GAC is mainly for storing shared libraries, especially when your application requires a specific version. This way, I could install FooLib 1.0 and FooLib 2.0 on the same machine, and

How do I add a modified dll to the Global Assembly Cache?

女生的网名这么多〃 提交于 2019-12-12 01:17:10
问题 I have the MySQL Connector/NET installed on my PC. I modified the source code and recompiled one of the dlls (MySQL.Data.dll). With the program already installed, how can add this dll to the Global Assembly Cache? If your answer involves using gacutil.exe, please tell me where I can find it on my PC or where I might download it. Thanks! 回答1: You can put it in the GAC but unless you have access to the private key with which it was originally signed, the installed program(s) will not recognize

How do I add a DLL to GAC

旧城冷巷雨未停 提交于 2019-12-11 08:19:58
问题 This is my code: Register(Assembly.GetExecutingAssembly()).Location); private void Register(String assemblyName) { System.Diagnostics.ProcessStartInfo processStartInfo = new System.Diagnostics.ProcessStartInfo("D://gacutil.exe", string.Format("/i {0}", assemblyName)); processStartInfo.UseShellExecute = false; System.Diagnostics.Process process= System.Diagnostics.Process.Start(processStartInfo); process.WaitForExit(); } How do I add the DLL to the assembly Folder? 回答1: You have to put the

How to tell which application(s) have a given assembly registered in the GAC?

不羁岁月 提交于 2019-12-10 17:22:02
问题 When trying to remove a given assembly (log4net.dll in this case, but it should apply to any similar case) using gacutil.exe, the action fails due to the assembly being required by an application. However, I can't figure out how to tell which application(s) actually require it. Since the output seems to indicate that the requirement is logged in the MSI database / Windows Installer, it would seem like some util would be able to either list all the GAC assemblies registered in the MSI database

VS 2015 copies to output GAC references of a project reference regardless of copy local setting

我的梦境 提交于 2019-12-06 19:21:24
问题 I've raised a connect issue for that behavior. VS 2015 copies to output GAC references of a project reference regardless of copy local setting. VS 2010 doesn't do that with the same solution & projects, respecting the copy local property. The only workaround I've found so far is to add a direct reference to Microsoft.Web.Services3.dll in Project A and set it to copy local = false. Steps to reproduce: Project A |__ Project B (Project Reference, copy local = true) |__Microsoft.Web.Services3.dll

Microsoft Office Interop Assembly references

不想你离开。 提交于 2019-12-01 05:54:07
I have an application developed in Visual Studio 2005 which I am deploying using ClickOnce. My solution contains two projects - a user interface layer coded in VB, and a class library coded in C#. My C# class library has some code that uses the Outlook and Excel Interop Assemblies (Microsoft.Office.Interop.Outlook and Microsoft.Office.Interop.Excel, both version 11). Here are my questions. Although I haven't found where this is stated as an absolute, my understanding is that you MUST have the appropriate versions of the Office applications (Outlook/Excel) in order to install an application

Microsoft Office Interop Assembly references

青春壹個敷衍的年華 提交于 2019-12-01 04:45:54
问题 I have an application developed in Visual Studio 2005 which I am deploying using ClickOnce. My solution contains two projects - a user interface layer coded in VB, and a class library coded in C#. My C# class library has some code that uses the Outlook and Excel Interop Assemblies (Microsoft.Office.Interop.Outlook and Microsoft.Office.Interop.Excel, both version 11). Here are my questions. Although I haven't found where this is stated as an absolute, my understanding is that you MUST have the

Methods to programmatically install a .NET assembly into the GAC

给你一囗甜甜゛ 提交于 2019-11-30 13:06:50
I need to create a small app or script to install a .NET assembly into the GAC. I've read there are a couple ways to do this including: using gacutil.exe executing the following line of code: new System.EnterpriseServices.Internal.Publish().GACInstall("Foo.dll"); However, what would happen if I just created the appropriate directories on the machine and copied the assembly into that directory? The structure of the GAC directory is the following: C:\Windows\assembly\GAC_MSIL\Foo\<version#>__<public token>\Foo.dll Do the above two methods do anything special besides creating the folder structure

How to programmatically determine if .NET assembly is installed in GAC?

早过忘川 提交于 2019-11-30 06:57:41
What's the easiest way to check programmatically if an assembly is registered in the GAC (Global Assembly Cache) on the local machine? Is there some easy to use .NET API where I can give it a location to an assembly DLL or an Assembly object itself to check if it exists in GAC on the local machine? In my case the assembly I'm checking will already be loaded in the current AppDomain of the program checking so I'm not sure calling Assembly.ReflectionOnlyLoad and catching an exception will work like I've seen suggested in other posts, plus that seems kind of hacky. Ideally I'd like to avoid