【问题标题】:Getting assembly information in .NET framework在 .NET 框架中获取程序集信息
【发布时间】:2012-08-17 18:58:10
【问题描述】:

我在 32 位操作系统和 64 位操作系统中安装了水晶报表,

in 32-bit it installs in SOFTWARE location under HKEY_LOCALMACHINE.

in 64-bit it installs in SOFTWARE\WOw6432Node location under HKEY_LOCALMACHINE

如何在不指定路径的情况下加载程序集?

即。我不想这样做

System.Reflection.Assembly assemblyInfo = System.Reflection.Assembly.LoadFile("C:\\Program Files (x86)\\Engine.dll");

Engine.dll 可以位于程序文件之外的任何位置。

.NET 框架中有什么东西可以用来制作框架吗? 加载程序集信息,当我单独提供 .dll 名称时? (内部框架可以搜索它 并加载程序集信息)。

我认为 GetTypeFromProgID 可能没有帮助。

【问题讨论】:

    标签: c# asp.net .net reflection .net-assembly


    【解决方案1】:

    要使程序集命名空间可全局访问,您需要将程序集放入 GAC。

    How to: Install an Assembly into the Global Assembly Cache

    【讨论】:

    • Crystal Reports 应该已经安装在 GAC 中 - 检查 C:\Windows\Assembly
    • 是的,我不能从那里获取诸如令牌 GUID、版本等的程序集信息或创建该程序集的实例吗?
    【解决方案2】:

    在gac中设置

    gacutil.exe -I <assembly name>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多