gac

How can I force .NET to use a local copy of an assembly that's in the GAC

廉价感情. 提交于 2019-11-27 06:26:34
I have a .NET assembly that (for reasons outside my control) must be in the GAC. However, the same assembly is used by another program, which has a its own copy of an older version of the same assembly. It must use its own copy and not whatever is in the GAC. Proper versioning is probably more hassle than it's worth in this case, for reasons I won't go into. My questions is: is there anyway to tell .NET: just use THIS DLL, right here in this directory - ignore whatever you find in the GAC or anywhere else . Make sure the GAC Assembly and local Assembly have different version numbers (not a bad

What is the GAC in .NET?

两盒软妹~` 提交于 2019-11-27 06:01:54
Just looking for a short overview of GAC for a layman, not a link please. Tom Ritter Right, so basically it's a way to keep DLLs globally accessible without worrying about conflicts. No more DLL Hell. Each architecture and version gets it's own place to live. It also gets it own way to browse it in Explorer, so if you go to C:\Windows\assembly In windows explorer it lists all the DLLs. But if you fire up cmd , you can see how it's really structured: C:\Users\tritter>cd C:\Windows\assembly C:\Windows\assembly>dir Directory of C:\Windows\assembly 07/20/2009 02:18 PM <DIR> GAC 06/17/2009 04:22 PM

Can a .NET Word 2003 add-in be installed outside of the GAC?

馋奶兔 提交于 2019-11-27 04:39:35
问题 I've created a Word add-in component, and a visual studio setup project to install the component. On a clean machine with Office 2003 installed, it does not seem to be possible to get the add-in component to load in Word. Googling the issue suggests that this is because the assembly is not trusted. I gave the assembly full trust using the command line tool: caspol -af AssemblyName.dll This makes no difference and the compenent is still not loaded in Word. caspol prints out a message "Because

Use Visual Studio Setup Project to automatically register and GAC a COM Interop DLL

痴心易碎 提交于 2019-11-27 03:43:48
I've created a .NET assembly for COM interop and it is working well on my development machine. I'm currently trying to figure out how to deploy the DLL to a target machine using Visual Studio's "Setup Project." How can I use the VIsual Studio setup project to do the following things: Register the assembly (currently using regasm ). The assembly needs to be registered successfully and the type library (.tlb) needs to be registered successfully . This answer suggests scrapping regasm in favor of custom code. I this is a good idea? If so, how does this code get included in the setup project? This

Check GAC for an assembly

北慕城南 提交于 2019-11-27 03:04:57
问题 How to programmatically check GAC for an assembly? 回答1: Without even trying to get complicated, you could just shell out to gacutil and capture the output. For example, gacutil /l Microsoft.Practices.Unity gives me: Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.30729.1 Copyright (c) Microsoft Corporation. All rights reserved. The Global Assembly Cache contains the following assemblies: Microsoft.Practices.Unity, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31

.NET Reference “Copy Local” True / False Being Set Based on Contents of GAC

只谈情不闲聊 提交于 2019-11-26 23:13:36
问题 We had a very interesting problem with a Win Forms project. It's been resolved. We know what happened, but we want to understand why it happened. This may help other people out in the future who have a similar problem. The WinForms project failed on 2 of our client's PCs. The error was an obscure kernel.dll error. The project ran fine on 3 other PCs. We found that a .DLL (log4net.dll - a very popular open-source logging library) was missing from our release folder. It was previously in our

Unable to uninstall an Assembly from GAC?

妖精的绣舞 提交于 2019-11-26 20:35:52
问题 I am unable to uninstall an Assembly (log4net.dll) from GAC. It is giving following error. "Assembly is required by one or more applications". However if I search the Assembly using ProcessExplorer nothing comes up? How can I remove this Assembly from GAC? 回答1: Have you considered reading this KB article and trying it out? Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you

enumerating assemblies in GAC

谁都会走 提交于 2019-11-26 20:27:23
问题 How can I enumerate all available assemblies in GAC in C#? Actually I am facing an issue with a stupid code - the assembly called Telerik.Web.UI.dll is referred and used in project - this particular DLL is not present in BIN folder. And application is working fine on the server - but on my machine, obviously compiler is giving error. Ex-Developer insists that it is not in GAC on the server and 'it is what it is'. Now I need to check whether this DLL is registered in GAC or not. Help will be

What are the advantages and disadvantages of using the GAC?

风格不统一 提交于 2019-11-26 18:43:12
And on top of that, are there cases where one has to use the global assembly cache or where one cannot use it? Loading assemblies from GAC mean less overhead and security that your application will always load correct version of .NET library You shouldn't ngen assemblies that are outside of GAC, because there will be almost no performance gain, in many cases even loss in performance. You're already using GAC, because all standard .NET assemblies are actually in GAC and ngened (during installation). Using GAC for your own libraries adds complexity into deployment, I would try to avoid it at all

When and when-not to install into the GAC?

こ雲淡風輕ζ 提交于 2019-11-26 18:34:36
When should you install into the GAC and when should you not? (I am referring, really, to installing on a client's machine when they have purchased our product(s)). I have an assembly that is only going to be used with my one application (GAC or no-GAC)? I have an assembly that all my applications share (GAC or no-GAC)? All my applications may use different versions of my assembly (GAC or no-GAC)? These are three scenarios... but I am sure there are more. I'm not necessarily looking an answer to only these three questions. Similar question: What are the advantages and disadvantages of using