Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序具有插件结构,系统上可能有两个版本的插件。如果文件名发生冲突,但文件哈希不同,我很可能会处理同一程序集的两个不同版本。我如何确定不加载有问题的文件?我需要能够删除文件,因此不能从磁盘加载它们。
我不认为你需要担心它。应用程序清单通过名称、版本和文化的组合来跟踪程序集。
如果您正在动态加载程序集:
Assembly SampleAssembly = Assembly.Load ("SampleAssembly, Version=1.0.2004.0, Culture=neutral, PublicKeyToken=8744b20f8da049e3");