gac

Enumerate all installed versions of an assembly (in GAC)

送分小仙女□ 提交于 2019-12-10 13:45:40
问题 Is it possible to enumerate all installed versions of an assembly in GAC using C#? For example I have the assembly named "My.Assembly". The assembly may come in various versions ("1.0.0.0", "2.3.4.5", "0.1.2.4", ...) and may be compiled for various platforms (x86, x64, Any CPU). Now I need a way to determine which of the versions/platforms are installed. I'm aware that I could enumerate the directories in GAC but that seems wrong. There should be a better way to do this. Background I have a

Include GAC Assemblies in Bin

て烟熏妆下的殇ゞ 提交于 2019-12-10 12:49:52
问题 Any ideas how to force a GAC DLL into referenced? Here is my issue, I constantly use a 3rd party DLL that registers itself into the GAC, and when I use it in my project, it reads it from the gac, and when I deploy, I'm always forgetting to add the DLLs since it is not located in the Bin/Referenced folder. Anyway to force Visual Studio to add the DLL instead of from GAC? 回答1: Right click on the assembly reference, select properties, and change "Copy Local" to true. That will cause it to copy

Alternatives to GAC for sharing code between mvc sites

孤者浪人 提交于 2019-12-10 11:24:32
问题 Currently, we have c# object registered in the gac which we use to output a html/string which acts as a common menu for our web applications. The benefit of the gac registered object is that we can update the gac object and all applications that reference it get the updates very efficiently. The html menu references some js and css resources at a common location. The c# object does perform some logic based on servers/environments etc. Are there alternatives other than GAC objects to perform

Deploying dlls to GAC

↘锁芯ラ 提交于 2019-12-10 09:53:19
问题 We have a Sharepoint 2010 solution that we are trying to the deploy to the production environment. We have developed this solution using Visual Studio 2010 and we have created several projects which result in a number of dlls. We are getting the following error when accessing one of the web parts. 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

2.0 version of System.Management.Automation?

自作多情 提交于 2019-12-10 03:54:27
问题 Is there a 2.0 (or greater) version of the System.Management.Automation assembly? I'm looking at the PowerShell class in C# which says that this class was introduced with PowerShell 2.0 . Does that version number correspond with the version number I'm seeing when I add the reference to the assembly in Visual Studio? This is kind of an additional question to my other question which is in regards to having trouble resolving the PowerShell class inside that assembly. I've tried the System

Using WiX to put an assembly into both the GAC and Install Path

本小妞迷上赌 提交于 2019-12-09 14:48:08
问题 I'm just starting to learn how to use WiX and I'm running into a snag. My package uses a third party library that requires some file to exist both in the GAC and the package installation directory. Using WiX, I can make files show up in the installation directory, or in the GAC, but not both. Is there any way to work around this? 回答1: There's a post here about installing an assembly to both the GAC and local file system. This has some actual WiX code in it that does what you're looking for.

Install-Package : Failed to add reference to 'System.Runtime'

大兔子大兔子 提交于 2019-12-09 02:12:30
问题 I'm trying to install the Autofac nuget package in my project using the command Install-Package -Prerelease Autofac but it fails with the error Install-Package : Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache. I've tried re-installing .NET Framework 4.5.2 (which is the version my project targets) but got the message ".NET Framework 4.5.2 is already installed". However, searching C:\Windows\assembly\ for System.Runtime.dll doesn't find any

How to register a non-strong-name assembly to be loaded as if it were in the GAC?

霸气de小男生 提交于 2019-12-08 22:22:39
问题 One of our partners provided us with an assembly we need to access from our application. Unfortunately, this is not strong-name so we can't install it to the GAC. And we can't place it in the same place as our executable. Is there a solution for this? EDIT: This will be a temporary solution only for testing, when they go RC, we will have a strong-named assembly. 回答1: You have a few options at that point. The first is to place the assembly in a directory that has the name of the assembly

Could not load file or assembly 'System.Net.Http'

喜夏-厌秋 提交于 2019-12-08 15:55:13
问题 1. Error when starting app Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Stack Trace: [FileNotFoundException: Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.] System.Web.Http.GlobalConfiguration..cctor() +0

Where is my GAC located?

倾然丶 夕夏残阳落幕 提交于 2019-12-08 14:55:53
问题 I wanted to become more familiar with the .Net Global Assembly Cache. Various sources online say it can be found in Explorer in C:\WINNT\Assembly. But I don't seem to have a WINNT folder under C: on my Windows XP machine. I have "Show Hidden Files and Folders" checked and "Hide Protected Operating System Files" UN-checked. Using the methods described in How to detect what .NET Framework versions and service packs are installed? and especially in http://msdn.microsoft.com/en-us/kb/kbarticle