转载:程序集的查找顺序

Windows Installer出错-终极解决方案大全 本文还有配套的精品资源,点击获取 简介:Windows Installer是用于安装、升级和卸载应用程序的关键组件,但错误的出现会阻碍这一过程。本文汇总了解决Windows Installer出错的全面方法,涵盖了从基本排查到高级修复步骤的所有内容。介绍了可能的出错原因,如安装文件损坏、注册表错误、权限不足、软件冲突及服务未启动等,并提出了对应的解决方案,包括重新下载安装包... 阅读详情

https://msdn.microsoft.com/zh-cn/library/aa374224(v=vs.85).aspx



Assembly Searching Sequence

If an isolated application specifies an assembly dependency, side-by-side first searches for the assembly among the shared assemblies in the WinSxS folder. If the required assembly is not found, side-by-side then searches for a private assembly installed in a folder of the application's directory structure.

Private assemblies may be deployed in the following locations in the application's directory structure:

  • In the application's folder. Typically, this is the folder containing the application's executable file.
  • In a subfolder in the application's folder. The subfolder must have the same name as the assembly.
  • In a language-specific subfolder in the application's folder. The name of the subfolder is a string of DHTML language codes indicating a language-culture or language.
  • In a subfolder of a language-specific subfolder in the application's folder. The name of the higher subfolder is a string of DHTML language codes indicating a language-culture or language. The deeper subfolder has the same name as the assembly.

The first time side-by-side searches for a private assembly, it determines whether a language-specific subfolder exists in the application's directory structure. If no language-specific subfolder exists, side-by-side searches for the private assembly in the following locations using the following sequence.

  1. Side-by-side searches the WinSxS folder.
  2. \\<appdir>\<assemblyname>.DLL
  3. \\<appdir>\<assemblyname>.manifest
  4. \\<appdir>\<assemblyname>\<assemblyname>.DLL
  5. \\<appdir>\<assemblyname>\<assemblyname>.manifest

If a language-specific subfolder exists, the application's directory structure may contain the private assembly localized in multiple languages. Side-by-side searches the language-specific subfolders to ensure that the application uses the specified language or the best available language. Language-specific subfolders are named using a string of DHTML language codes that specify a language-culture or language. If a language-specific subfolder exists, side-by-side searches for the private assembly in the following locations using following sequence.

  1. Side-by-side searches the WinSxS folder.
  2. \\<appdir>\<language-culture>\<assemblyname>.DLL
  3. \\<appdir>\<language-culture>\<assemblyname>.manifest
  4. \\<appdir>\<language-culture>\<assemblyname>\<assemblyname>.DLL
  5. \\<appdir>\<language-culture>\<assemblyname>\<assemblyname>.manifest

Note that the side-by-side search sequence finds a DLL file with the assembly's name and stops before searching for a manifest file having the assembly's name. The recommended way to handle a private assembly that is a DLL is to put the assembly manifest in the DLL file as a resource. The resource ID must be equal to 1 and the name of the private assembly may be the same as the name of the DLL. For example, if the name of the DLL is MICROSOFT.WINDOWS.MYSAMPLE.DLL, the value of the name attribute used in the assemblyIdentity element of the assembly's manifest may also be Microsoft.Windows.mysample. As an alternative, you may put the assembly manifest in a separate file, however, the name of the assembly and its manifest must then be different than the name of the DLL. For example, Microsoft.Windows.mysampleAsm, Microsoft.Windows.mysampleAsm.manifest, and MICROSOFT.WINDOWS.MYSAMPLE.DLL.

For example, if myapp is installed at the root of drive c: and requires myasm in French-Belgian, side-by-side uses the following sequence to search for the best approximation to a localized instance of myasm.

  1. Side-by-side searches WinSxS for the fr-be version.
  2. c:\myapp\fr-be\myasm.dll
  3. c:\myapp\fr-be\myasm.manifest
  4. c:\myapp\fr-be\myasm\myasm.dll
  5. c:\myapp\fr-be\myasm\myasm.manifest
  6. Side-by-side searches WinSxS for the fr version.
  7. c:\myapp\fr\myasm.dll
  8. c:\myapp\fr\myasm.manifest
  9. c:\myapp\fr\myasm\myasm.dll
  10. c:\myapp\fr\myasm\myasm.manifest
  11. Side-by-side searches WinSxS for the en-us version.
  12. c:\myapp\en-us\myasm.dll
  13. c:\myapp\en-us\myasm.manifest
  14. c:\myapp\en-us\myasm\myasm.dll
  15. c:\myapp\en-us\myasm\myasm.manifest
  16. Side-by-side searches WinSxS for the en version.
  17. c:\myapp\en\myasm.dll
  18. c:\myapp\en\myasm.manifest
  19. c:\myapp\en\myasm\myasm.dll
  20. c:\myapp\en\myasm\myasm.manifest
  21. Side-by-side searches WinSxS for the no language version.
  22. c:\myapp\myasm.dll
  23. c:\myapp\myasm.manifest
  24. c:\myapp\myasm\myasm.dll
  25. c:\myapp\myasm\myasm.manifest

If side-by-side searching reaches a language-neutral version of the assembly, and a Multilanguage User Interface (MUI) version of Windows is present on the system, side-by-side then attempts to bind to <assemblyname>.mui. Side-by-side does not attempt to bind to <assemblyname>.mui if the search reaches a localized version of the assembly. The assembly manifest of a language-neutral assembly will not have a language attribute in its assemblyIdentity element. If side-by-side reaches a language-neutral assembly, and MUI is installed, side-by-side searches the following locations using the following sequence for <assemblyname>.mui. Side-by-side uses the same search sequence if the assembly is culture-neutral, except <no language> is not searched.

  1. Side-by-side searches the WinSxS folder for <assemblyname>.mui.
  2. \\<user's language-culture>\<assemblyname>.mui
  3. \\<user's language>\<assemblyname>.mui
  4. \\<system's language-culture>\<assemblyname>.mui
  5. \\<system's language>\<assemblyname>.mui
  6. \\<no language>\<assemblyname>.mui

For example, if side-by-side searching finds the private assembly at c:\myapp\myasm\myasm.manifest, and myasm is a language-neutral assembly. Side-by-side then uses the following sequence to search for myasm.mui. Note that side-by-side will not search for a language-neutral MUI assembly.

  1. Side-by-side searches WinSxS for the fr-be version of the MUI assembly.
  2. c:\myapp\fr-be\myasm.mui.dll
  3. c:\myapp\fr-be\myasm.mui.manifest
  4. c:\myapp\fr-be\myasm\myasm.mui.dll
  5. c:\myapp\fr-be\myasm\myasm.mui.manifest
  6. Side-by-side searches WinSxS for the fr version of the MUI assembly.
  7. c:\myapp\fr\myasm.mui.dll
  8. c:\myapp\fr\myasm.mui.manifest
  9. c:\myapp\fr\myasm\myasm.mui.dll
  10. c:\myapp\fr\myasm\myasm.mui.manifest
  11. Side-by-side searches WinSxS for the en-us version of the MUI assembly.
  12. c:\myapp\en-us\myasm.mui.dll
  13. c:\myapp\en-us\myasm.mui.manifest
  14. c:\myapp\en-us\myasm\myasm.mui.dll
  15. c:\myapp\en-us\myasm\myasm.mui.manifest
  16. Side-by-side searches WinSxS for the en version of the MUI assembly.
  17. c:\myapp\en\myasm.mui.dll
  18. c:\myapp\en\myasm.mui.manifest
  19. c:\myapp\en\myasm\myasm.mui.dll
  20. c:\myapp\en\myasm\myasm.mui.manifest

 

 

社区附加资源

添加

New, undocumented, manifest search behaviour in Windows 7

Windows XP and 2003 Server first looked for a DLL then for a manifest file as described above. If the DLL existed, Windows stopped search no matter if the DLL contained manifest or not. Windows 7 seems to have changed this behaviour. CSRSS now looks for the manifest in the DLL and if the manifest is not there, Windows closes the DLL handle and tries a corresponding *.Manifest file. This behaviour can easily be see using Process Monitor.


Microsoft, please update the above article.

12/22/2012

DONT use private assemblies!

See http://support.microsoft.com/kb/835322 "Applications that bypass globally serviced side-by-side assemblies may be vulnerable to issues that are fixed by a Microsoft software update"!

Write-up of how to use private library assemblies

The information on how to deploy Visual Studio runtime libraries as
private assemblies is distributed across several MSDN articles that are
sometimes not too easy to understand. I have tried to compile the
relevant information in a single blog article. I hope some of you find
it helpful:


http://it-from-inside.blogspot.com/2010/03/deploying-visual-c-runtime-files-as.html
3/3/2010
显示:
   
彻底卸载清理软件的微软工具 彻底卸载清理软件的微软工具:windows install clean up和MicrosoftFixit.ProgramInstallUninstall 大多软件在安装正常的情况下都是可以轻松卸载清理掉的,但是有些软件由于在安装过程中出现错误,导致软件既无法继续安装,也不能卸载,比如工商银行的防钓鱼插件,笔者即使在正常安装的情况下,也导致无法卸载,无论使用windows自带的卸载功能还是使用第三方卸载工具,均无法奏效,还有一个无法卸载的软件例子,那就是vc++2005、2008、2010、2012等运行库在某些情况下,正常安装过后也会导致无法卸载,总之,这样的例子很多,但是大家每当遇到这种情况时都首先想到使用第三方的卸载清理工具,其实微软自家就产有针对无法卸载的软件的彻底清除工具,那就是windows install clean up和MicrosoftFixit.ProgramInstallUninstall 立即下载

相关推荐

别再只盯着充电功率了!从PWM信号到PLC通信,一文读懂CCS2充电桩如何跟你家电动车“聊天”

本文深入解析了CCS2充电桩与电动汽车之间的12次关键通信交互,从硬件握手到PLC加密通信,再到充电参数动态协商与安全校验。通过详细的技术细节和实时交互逻辑,揭示了现代快充技术如何实现高效安全的能量传输,帮助用户理解充电过程中的核心技术要点与故障排查方法。

weixin_30527323的博客 149

卸载office提示无法打开修补程序包 修补程序包是否存在的解决方法.

今日装了深度9.0 SP3 会员修改过的版本(因找不到官方版)后,卸载不了office..  而我又需要用到ass数据库,这可怎么办呢?一到控制面板点卸载居然给我提示“无法打开修补程序包 修补程序包是否存在”..真无奈,好吧,用wom优化大师...卸载是可以了,但是却装不上,还是那个提示..看来是注册表还是有残渣..这个时候,百度一下,找到了解决的方法,再次共享给大家吧。-------------

№快乐因你♂ 7664

PID温控实验平台搭建(二)——PID进阶知识介绍及源码分享

最近,我突发奇想去翻阅了一些我本科期间所做的一些小项目,发现都挺有意思的!希望通过我的讲解文章可以帮助你们少走一些弯路!今天,我要分享的是一个PID温控实验平台的搭建,这是一个系列文章,手把手地教你学习和认识PID算法,了解这种算法在温度控制中的应用。由于我知识有限,如果出现一些错误,希望大家可以帮助我指出来,我们一起学习进步!!!

qq_35953617的博客 8061

Adobe Acrobat Reader零时差漏洞说明与建议

Adobe已针对Windows及macOS发布了Adobe Acrobat与Reader的安全更新。这些更新解决了14个严重(Critical)或重要(Important)等级漏洞,成功的利用将可在现有使用者环境下允许执行任意程序代码。Adobe已收到一份报告,指出CVE-2021-28550该零时差漏洞已针对Windows上Adobe Reader的使用者广泛的攻击利用。 相关新闻 Adobe已发布了一系列重要安全修补程序,更新修复了十二种不同应用程序中至少43个漏洞,其中包括了被广泛利用的Ad.

u013098079的博客 1066

【Claude Code】Claude Code 使用指南

本文介绍了AI编码助手Claude的基础和进阶操作指南。基础部分涵盖启动命令、模式切换(自动编辑/Plan/Yolo模式)、资源监控等核心功能,重点讲解了斜杠命令的使用方法。进阶操作详细说明了CLAUDE.md文件的创建与管理,包括项目规范、代码风格等内容的配置,以及如何通过该文件建立持久上下文。同时提醒了使用过程中的安全风险,建议通过配置文件限制AI对关键代码的访问权限。全文提供了完整的操作指引和安全建议,帮助开发者高效安全地使用Claude进行编码辅助。

大家好,我是敖云岚,一个沉迷代码的 “技术玩家”。擅长 Java、C++ 开发,对 MySQL、Redis、RabbitMQ 等技术也颇有研究。博客里既有硬核技术干货,也有诙谐幽默的编程日常分享。愿和你一起,笑着学技术,快乐敲代码! 1万+

在 Linux 虚拟机中手动安装 VMware Tools

对于 Linux 虚拟机,您可以从命令行手动安装 VMware Tools。对于 Linux 的较高发行版,请使用集成的 open-vm-tools 版本。 前提条件 有关 open-vm-tools 的操作系统兼容性的详细信息,请参见《VMware 兼容性指南》,网址为VMware Compatibility Guide - System Search。 开启虚拟机。 确认客户机操作系统正在运行。 因为 VMware Tools 安装程序是使用 Perl 编写的,请确认已在客户机操作系统中安..

m0_62526815的博客 1762

解决Windows Installer 无法打开此修补程序包

症状当您首次尝试安装 Microsoft Office 程序或运行某个 Office 程序时,可能收到一条错误消息。如果您是通过 Administrator 用户帐户登录计算机的,可能收到下面的错误消息:安装时发生严重错误如果您是通过具有管理员权限的标准用户帐户登录计算机的,可能收到

princelintb的专栏 4万+

【图像去噪】论文精读:FM2S: Self-Supervised Fluorescence Microscopy Denoising With Single Noisy Image

论文题目:FM2S: Self-Supervised Fluorescence Microscopy Denoising With Single Noisy Image —— FM2S:单噪声图像自监督荧光显微镜去噪arXiv 2024!显微图像去噪!通过可视化详细的细胞结构和生物过程,荧光显微镜具有显着先进的生物学研究。然而,由于难以精确建模固有噪声和获取干净图像进行训练,这种图像去噪任务往往面临挑战,这限制了大多数现有方法。在本文中,我们提出了一种有效的。

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 417

C#程序集系列12,C#编译器和CLR如何找寻程序集

本篇体验C#编译器和CLR运行时如何查找程序集,并自定义CLR运行时查找程序集的方式。 □ C#编译器和CLR运行时如何查找程序集 C#编译器在哪里?--在C:\Windows\Microsoft.NET\Framework\v4.0.30319中 →删除F盘as文件夹中所有的exe和dll文件→把上一篇全局程序集缓存文件夹(C:\Windows\Microsoft.NET\assembly\...

weixin_30363817的博客 279

DA14531之如何Debug(在线调试、Jlink仿真、串口打印)

在线调试和串口打印调试。在线调试是Keil软件配合Jlink编译、烧录、仿真为一体的,其操作包括:运行、停止、打断点,单步运行等。而串口打印调试,只需打开相关配置,让arch_printf()函数正常输出串口数据。若想在初始化完成后打印arch_printf(“goto Loop\r\n”);波特率为115200,接收到串口消息goto Loop。连好线后,点击仿真按钮,在线Jlink调试。

hejinwu1314的博客 1799

RK3568笔记六十一:MIPI摄像头应用程序编写

V4L2设备驱动框架向应用层提供了一套统一、标准的接口规范,应用程序按照该接口规范来进行应用编程,从而使用摄像头。对于摄像头设备来说,其编程模式如下所示:1.首先是打开摄像头设备;2.查询设备的属性或功能;3.设置设备的参数,譬如像素格式、帧大小、帧率;4.申请帧缓冲、内存映射;5.帧缓冲入队;6.开启视频采集;7.帧缓冲出队、对采集的数据进行处理;8.处理完后,再次将帧缓冲入队,往复;9.结束采集。

1010

第三章 共享程序集和强命名程序集

1. 概述   本章的重点是如何创建可由多个应用程序访问的程序集。 2. 名词解释   ① 公钥标记:从公钥派生的一个小的哈希值。 3. 主要内容   3.1 两种程序集,两种部署     CLR支持两种程序集:弱命名程序集 和 强命名程序集。     一个程序集可以采取两种方式来部署:私有 或 全局。     弱命名程序集只能私有部署,强命名程序集两种部署皆可。   3.2...

weixin_30289831的博客 147

Ardupilot chibios主函数学习(1)

目录 文章目录目录摘要第一部分chibios主函数**(1)主回调函数入口****(2)主回调函数入口****(3)主回调函数入口****(4)主回调函数入口**1.函数hal.scheduler-&amp;amp;amp;amp;amp;amp;amp;gt;init()分析 摘要 本节主要记录自己学习Ardupilot的 chibios代码过程,欢迎批评指正。 第一部分chibios主函数 (1)主回调函数入口 AP_HAL_MAIN_...

陌城烟雨 4250

程序集

在C#中,我们要使用反射,主要有三个方面: 第一,反射程序集,模块,类的成员以及成员的一些信息; 第二,接下来就是动态调用类的成员方法; 第三个方面就动态产生程序集,模块和类以及类的成员。 我们要使用反射,首先要搞清楚以下命名空间中几个类的关系: System.Reflection命名空间 AppDomain:应用程序域,可以将其理解为一组程序集的逻辑容器 Assembly:程序集类...

weixin_30376163的博客 70

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

CLR的程序集定位算法

CLR是如何定位我们需要加载的程序集的呢?实际上CLR按如下的顺序来定位程序集:1,如果程序集有强名称,在首先在全局程序集缓(GAC)中查找程序集。 2,如果程序集的强名称没有正确指定或GAC中找不到,那么通过配置文件中的<codebase>元素指定的URL来查找3,如果没有指定强名称或是在GAC中找不到,CLR会探测特定的文件夹: 假设你的应用程序目录是C...

weixin_30542079的博客 152

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

DotNet Assembly 加载顺序

目录的查找顺序: GAC目录(如果是StrongName Assembly) 应用目录 应用子目录 配置文件中的附加位置 转载于:https://www.cnblogs.com/upzone/archive/2010/04/16/1713408.html...

weixin_30376083的博客 121

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

应用程序配置和动态加载5----反射程序集(转载)

在.Net中,程序集是进行部署、版本控制的基本单位,它包含了相关的模块和类型,同时也包含了描述这些类型的元数据。在System.Reflection命名空间下有一个Assembly类型,它代表了一个程序集,并包含了关于程序集的信息。 1.在程序中加载程序集 在程序中加载程序的方法主要有下面的几种方法。 1.1.隐式加载 没有被显式加载但被引用的程序集,CLR会按照全局程序集缓存(...

weixin_30588907的博客 86

CLR的程序集定位算法(转)

CLR的程序集定位算法 CLR是如何定位我们需要加载的程序集的呢?实际上CLR按如下的顺序来定位程序集:1,如果程序集有强名称,在首先在全局程序集缓(GAC)中查找程序集。 2,如果程序集的强名称没有正确指定或GAC中找不到,那么通过配置文件中的<codebase>元素指定的URL来查找3,如果没有指定强名称或是在GAC中找不到,CLR会探测特定的文件...

weixin_30387423的博客 75

Unity工具之设置C#脚本执行顺序

在Unity中经常需要调整脚本的执行顺序,以控制整个执行的流程,Unity本身通过设置ScriptExecutionOrder来解决此问题。 Unity提供了对应的工具可以直接调整脚本的执行顺序,但是此工具在使用上并不方便,本文将重点介绍另一种方式,通过为脚本添加属性,借助于编辑器功能进一步自动调整脚本的执行顺序。

Erick的博客 2193

使用manifest管理应用程序的依赖文件

我们在开发应用程序时,一般会引入一些第三方库,通常情况下,我们是把这些第三方依赖文件放到应用程序所处目录,这样应用程序启动时就能正确找到相关依赖文件。但当依赖文件比较多,我们希望对依赖的文件进行归类,放置到不同的目录下以便管理,这个时候应用程序的manifest就派上用场了。

zxf347085420的博客 589

《CLR via C#》笔记:第1部分 CLR基础

C#入门书籍,这本书其实更像是“字典”,所以我就对重点内容以及其中专业术语进行了补充和总结,其余内容只提供了一个页数索引。开篇三章主要讲了CLR原理以及打包相关的原理。

sugarsama的博客 1051

Assembly.Load()方法,Assembly.LoadFrom()方法,Assembly.LoadFile()方法的区别!

1,Assembly.Load() 这个方法通过程序集的长名称(包括程序集名,版本信息,语言文化,公钥标记)来加载程序集的,会加载此程序集引用的其他程序集,一般情况下都应该优先使用 这个方法,他的执行效率比LoadFrom要高很多,而且不会造成重复加载的问题(原因在第2点上说明) 使用这个方法的时候, CLR会应用一定的策略来查找程序集,实际上CLR按...

weixin_30340775的博客 258
上一篇: 程序集清单文件
下一篇: 转载:Windows API 索引
心想才事成
博客等级 码龄20年 104粉丝 420原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值