Меню Закрыть

C windows assembly gac msil

Содержание

В глобальном кэше сборок сохраняются сборки, которые могут использоваться несколькими приложениями. The global assembly cache (GAC) stores assemblies that several applications share. Установите сборку в глобальный кэш сборок с одним из следующих компонентов: Install an assembly into the global assembly cache with one of the following components:

В глобальный кэш сборок можно установить только сборки со строгими именами. You can install only strong-named assemblies into the global assembly cache. Сведения о создании сборки со строгим именем см. в разделе как подписать сборку строгим именем. For information about how to create a strong-named assembly, see How to: Sign an assembly with a strong name.

установщик Windows Windows Installer

Установщик Windows — средство установки Windows, которое рекомендуется использовать для добавления сборок в GAC. Windows Installer, the Windows installation engine, is the recommended way to add assemblies to the global assembly cache. Установщик Windows предоставляет возможность подсчета ссылок на сборки в GAC и другие дополнительные возможности. Windows Installer provides reference counting of assemblies in the global assembly cache and other benefits. Создать пакет установщика для установщика Windows можно с помощью расширения Wix Toolset для Visual Studio 2017. To create an installer package for Windows Installer, use the WiX toolset extension for Visual Studio 2017.

программа глобального кэша сборок Global Assembly Cache tool

Служебную программу глобального кэша сборок .NET (gacutil.exe) можно использовать для добавления сборок в глобальный кэш сборок и для просмотра содержимого указанного кэша. You can use the .NET Global Assembly Cache utility (gacutil.exe) to add assemblies to the global assembly cache and to view the contents of the global assembly cache.

Читайте также:  Функция истина ложь в excel

Gacutil.exe предназначен только для разработки. Gacutil.exe is for development purposes only. Не используйте его для установки рабочих сборок в глобальный кэш сборок. Don’t use it to install production assemblies into the global assembly cache.

Синтаксис для использования gacutil.exe для установки сборки в глобальном кэше сборок выглядит следующим образом: The syntax for using gacutil.exe to install an assembly in the GAC is as follows:

В этой команде представляет собой имя сборки, устанавливаемой в глобальный кэш сборок. In this command, is the name of the assembly to install in the global assembly cache.

Есть пакет, с которым мне приходится иметь дело, который устанавливает сборки прямо в GAC (например, где-то глубоко в% windows%/assembly).

Как мне изгнать фактическую сборку (DLL) из GAC в обычную файловую систему?

15 ответов

137 Решение Andrew Hare [2009-04-03 20:36:00]

Я использовал совет эту статью, чтобы получить сборку из GAC.

Получить DLL из GAC

DLL один раз развертывается в GAC (обычно c:windowsassembly) невозможно просмотреть или используется как обычный DLL файл. Oни не могут быть напрямую связаны с VS проект. Разработчики обычно поддерживают копия исходного файла DLL и обратитесь к нему в времени разработки (дизайна), которое использует сборка от GAC во время выполнения проекта.

Во время выполнения (время выполнения), если сборка будет подписана и автоматически развертывается в GAC поднимает сборку от ПКК вместо DLL, на которую ссылаются во время время разработки в VS. В случае, если разработчик удалил исходную DLL или не имеют его по какой-то причине, есть способ получить DLL файл от ПКК. Выполните следующие действия. для копирования DLL из GAC

Запустите regsvr32/u C:WINDOWSMicrosoft.NETFrameworkv2.0.50727shfusion.dll

  • shfusion.dll — DLL расширителя explorer, который дает отчетливый посмотрите в папку GAC. Дерегистрация этот файл удалит сборку просмотра кеша и папка GAC быть видимым как любая нормальная папка в проводнике.
Читайте также:  Как зарегистрироваться в контакте анонимно

Перейдите в папку DLL в глубину, чтобы найти свою DLL.

Скопируйте DLL где-нибудь на свой жесткий диск и отсылайте его оттуда в своем проект

Запустить "regsvr32% windir%Microsoft.NETFramework shfusion.dll" на перерегистрируйте файл shfusion.dll и восстановить оригинальное GAC.

103 Sadjad [2009-04-03 20:38:00]

Метод, описанный здесь, очень прост:

Резюме из статьи:

  • Отобразить сетевой диск (проводник → Инструменты)
  • Карта вимя_серверапапка ( \YourServerC$WindowsAssembly )
  • Нет необходимости в совместном использовании, если вы являетесь Администратором.
  • Найдите диск и извлеките свою сборку
  • How can I open C:windowsassemblygac_msil in a Windows Explorer window using C#?

    Explanation: When I deploy an assembly to the GAC in my development environment, I like deploying the .pdb symbol file to the same directory as the assembly located at C:WindowsassemblyGAC_MSILAssemblyNameVersion__PublicKeyToken . That way if I want to attach the Visual Studio debugger, it automatically finds the symbol file.

    I’ve built a little utility that detects when I add one of my assemblies to the GAC and I want it to show a button that pops open the directory for me. I have the button and the path, but starting a process that launches explorer.exe with the path doesn’t work. The only way I know of to open this directory in Windows is through the Run dialog.

    You can’t get to it within explorer or using the command line command: explorer.exe "C:WindowsassemblyGAC_MSIL. " . Only if you type the path into the Run dialog. So how do I do what the Run dialog is doing?

    1 Answer 1

    As Hans Passant at one time had answered, the old GAC is displayed by a shell extension which masks the directory structure. This is to make sure the assemblies in the GAC are managed properly. Opening the directory structure is intentionally not supported. In .NET 4, that is no longer the case so if you can upgrade, that’s the way to go.

    Читайте также:  Вустерский соус что это цена

    To programmatically open the old GAC there are a few options but again, it is normally masked for a reason. Options:

    Remove the shell extension. You can unregister Shfusion.dll, open the directory, then re-register it. This, of course, could go wrong and leave you with Shfusion.dll permanently unregistered. This would allow other users to freely mess with the GAC directory structure and files which would cause it to become inval >

    Disable the shell extension. The HKLM Fusion registry key can have a DisableCacheViewer DWORD value. When set to 1, it will disable the view. The key can be set to 1, the window opened, then the key can be set back to 0. This approach has the same risks as option 1. Additionally, as a user (Damien) whose comment seems to have been deleted pointed out, other processes may also use this global key causing a race condition = bad.

    Use a 3rd party application like Total Commander (thanks to Csaba Toth) or Far Manager to view the directory structure instead of Explorer. The downside here is, assuming they can even accept arguments to allow them to open to the GAC directory, it would require installing that software everywhere I want to run my app.

    Рекомендуем к прочтению

    Добавить комментарий

    Ваш адрес email не будет опубликован.