gac

Cannot install assembly to cache?

时光怂恿深爱的人放手 提交于 2019-12-22 05:02:14
问题 I am trying to add an assembly to the cache on Visual Studio 2010 Command Prompt. I get this error "Failure adding assembly to the cache: Attempt to install an assembly without a strong name". I am adding a ListTasks2.dll assembly from a WCF Service App called ListTasks2. I never had this issue with a similarly-named project, so why is it raising an issue now? NOTE: I tried signing it in Visual Studio and it still doesn't work. I wonder if it might be a permission issue. I used different user

Could not load file or assembly 'System.Management.Automation'

荒凉一梦 提交于 2019-12-22 04:31:23
问题 I've written an asp.net MVC 3 web application ('ADReporter') on my local machine that uses Powershell to retrieve some data. If I run this application locally, everything works fine. Now I'm trying to run it on my Windows 2008 server but when i'm trying to access it, i get following stack trace: Server Error in '/ADReporter' Application. Could not load file or assembly 'System.Management.Automation' or one of its dependencies. Strong name signature could not be verified. The assembly may have

Yet another issue about log4net 1.2.11 conflicts

旧街凉风 提交于 2019-12-22 01:52:10
问题 I've spent the last 2 hours looking over these issues on SO, and nothing seems to be working. I have a solution that uses log4net 1.2.11, via NuGet. It works fine on my 32 bit development workstation running Windows 7. It does not run on my 64-bit Windows 2008 R2 test system. The error I get is: Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located

Use PowerShell to view contents of the Global Assembly Cache (GAC)

拥有回忆 提交于 2019-12-21 03:37:29
问题 Is there a way to use PowerShell to view the contents of the GAC? 回答1: Another option is that the PowerShell Community Extensions installs a GAC provider, so you can do this: dir gac: If you are on PowerShell V2, be sure to grab the 1.2 Beta. 回答2: To list entries in the GAC; gacutil -l In powershell you could parse the text output of the above. I don't know of a managed interface to inspect the GAC. 回答3: As stated in the docs: Starting with the .NET Framework 4, the default location for the

What is the best way to make shared libraries available to multiple applications?

断了今生、忘了曾经 提交于 2019-12-20 14:14:55
问题 Like most shops we've got a team of people working on various projects that all need to access the same core information and functions that relate to our business, usually in C#. We're currently just copying common classes from project to project, but everyone is starting to have their own flavors and we want to consolidate. We use Tortoise SVN and have decided to maintain a separate project to contain our common classes, but are not sure the best way to deploy this common code to our various

GAC - To add an assembly to the GAC, drag and drop works, but copy and paste doesn't? Why?

情到浓时终转凉″ 提交于 2019-12-20 10:48:27
问题 I would like to know why drag and drop works, and copy paste doesn't. What is happening with a drag and drop that isn't happening with a copy and paste? 回答1: When you drag and drop your assembly into C:\windows\assembly folder, it doesn't really get copied there—a special Windows Explorer plugin callis gacutil to install your assembly into GAC. This Explorer plugin can be confusing because it may give one an illusion that GAC is just plain simple folder with lots of DLLs. Actually, it is a

How to identify if a GAC assembly is loading

断了今生、忘了曾经 提交于 2019-12-20 04:23:35
问题 I have installed Visual Studio 2011 beta, and have found that a website I was working on has since stopped working. It has been suggested that there is an MVC or Razor assembly from the GAC which is loading and taking over. How would I check this? 回答1: Run the application in Debug mode and watch the Output window in Visual Studio. It will list every assembly as it is loaded, you will recognize GAC assemblies easily by its full file path. 回答2: Just of interest let's do it i runtime. The idea

Querying the x64-GAC

ε祈祈猫儿з 提交于 2019-12-20 01:45:44
问题 With the following code I'm querying the GAC to see if there is a certain assembly installed i it. The code itself works fine, but I only get the result for the x86 GAC. The assembly is installed in both GACs GAC_64 and GAC_32. What do I have to do so that 'QueryAssemblyInfo' checks the x64 GAC? public bool IsInGac(string assemblyName) { ASSEMBLY_INFO assembyInfo = new ASSEMBLY_INFO(); assembyInfo.cchBuf = 512; assembyInfo.currentAssemblyPath = new string('\0', assembyInfo.cchBuf);

How to reference a self made assembly that is installed in the GAC in visual studio?

ε祈祈猫儿з 提交于 2019-12-19 04:15:36
问题 I created a homemade assembly and I think I installed it correctly in the GAC using the .Net 2.0 configuration tool (mscorcfg.msu) However, when I want to reference it in visual studio, where do I find it? ( I know, I should not use the GAC anyway, but indulge me ;-)) EDIT: I did not ask the question clear enough: After installing the assembly to the GAC, it does not show up on the .NET tab of the Project-Add Reference menu. 回答1: The add reference dialog actually looks at the registry, in

How can i get the location of the GAC using C#?

吃可爱长大的小学妹 提交于 2019-12-19 04:05:46
问题 How can i get the location of the GAC directory using C#? Exist an entry in the Windows Registry? UPDATE I need the location because, i want to enumerate and analyze the assemblies located in the GAC. Bye. 回答1: If you want to enumerate the stuff in the GAC (e.g. writing an system administration tool) your best option is to use the fusion.dll although this requires some interop code on your side. Link to Microsoft for Fusion.DLL Documentation 回答2: It is in the %windir%\Assembly folder. Dan got