.net-assembly

Tools that can be used to debug .NET Assembly Load failures [closed]

本小妞迷上赌 提交于 2019-12-07 19:27:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . What are some good tools you use to debug a .NET assembly load failure that has native dependencies. I have used fusion logger (FUSLOGVW.exe) and ProcMon but they haven't helped me much. Any other tools that are useful? Thanks, Mohammed 回答1: The only other tool I found that was a bit helpful was Dependency

Retrieve strong name of .NET assembly in Inno Setup

谁都会走 提交于 2019-12-07 18:43:49
问题 I need to install these some DLL files to the GAC. I use preprocessor to generate [Files] section entries for these DLLs. And I need to provide a value for the StrongAssemblyName parameter. So question Can I automatically retrieve the StrongAssemblyName of a DLL from a Pascal Script? If not, can one create a dictionary so I could look up in the dictionary using the assembly name as key, and then have hardcoded value strings that would get used when automatically building up the line Source:

“Could not load file or assembly” error but I don't know which project is referencing this assembly with old number

﹥>﹥吖頭↗ 提交于 2019-12-07 16:03:32
When I am launching my WPF application, I got the error "Could not load file or assembly 'ASSEMBLY_NAME, Version=0.4010.4609.26378, Culture=neutral, PublicKeyToken='XXX' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)". The ASSEMBLY_NAME is the name of one project, which is referenced by many other projects because it is a core. My WPF project is also referencing it, and some projects referencing ASSEMBLY_NAME are references of my WPF project. However, both WPF project and its references which

.NET reflector + Reflexil Plugin

a 夏天 提交于 2019-12-07 15:38:05
问题 I've just installed reflexil v2.0 plugin but when I click on it after highliting a method it only displays 3 sub menus : Delete, Rename, Update Reflector object model...I'm not seeing Save as, Inject menus..anybody who can help me solve this? 回答1: 1) Install Reflector 2) download reflexil into Reflector\Addins folder C:\Program Files (x86)\Red Gate.NET Reflector\Desktop 9.0\Addins 3) open reflector > Tools > Add-Ins 4) add Reflexil.Reflector.dll 回答2: Right click your assembly in left pane,

Is Assembly.LoadFrom keeping an open file handle?

不羁岁月 提交于 2019-12-07 15:02:22
问题 I am loading another assembly using Assembly.LoadFrom("path.exe"); and after that i cant seem to delete that exe from the file system. so i was wondering if this path keeps an open file handle and how i can close it? 回答1: Yes, it is open until the assembly is unloaded from the appdomain. If you really need to delete the file, load its content into memory. The use Assembly.Load(byte[]) to load the assembly: using (Stream stream = File.OpenRead("path.exe")) { byte[] rawAssembly = new byte

How to load assemblies to the current app domain to the c# project dynamically?

╄→гoц情女王★ 提交于 2019-12-07 13:32:43
问题 I'm trying to load third party assemblies dynamically to the project and use reflection to create instance of their types. I used: Assembly.LoadFrom("Assembly1.dll") Assembly.LoadFrom("Assembly2.dll") Assembly.LoadFrom("Assembly3.dll") Also, tried: AppDomain.CurrentDomain.Load("Assembly1.dll") AppDomain.CurrentDomain.Load("Assembly2.dll") AppDomain.CurrentDomain.Load("Assembly3.dll") However, I keep getting The method is not implemented exception while I try to create instance of one of their

MEF, why are identical duplicates of one and the same exported plugin created?

拟墨画扇 提交于 2019-12-07 08:35:33
问题 (1) Using the code below I get exactly 2 items in my containers of one and the same exported plugin and I wonder why: (2) Additional question which I really cannot implement: How can I extend the framework to handle different plugin types (such as having several imports of different types, or one import that stores all plugins in a dynamic IEnumerable or so). I want to provide in my static wrapper class one generic method that returns the discovered plugin as a function of type and matching

Could not load file or assembly Microsoft.Win32.Primitives, Version=4.0.0.0

Deadly 提交于 2019-12-07 07:32:41
问题 I am having problems running my web application. The project setup is ASP.NET Core web application (.NET Framework). I don't seem to get any Build error. The project doesn't just run. System.IO.FileLoadException: 'Could not load file or assembly 'Microsoft.Win32.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)' 回答1:

Why does the compiler when using an overload in another assembly sometimes require you to also reference a subassembly?

情到浓时终转凉″ 提交于 2019-12-07 05:17:32
问题 There are quite a few questions/answers about the compiler error mentionend below and how to resolve it, but the question here is asking about some insights why in this case this is required. Why does a project A which uses an overload of a method of another referenced project B, which uses an object of project C in one of it's overloaded signatures require, that you reference project C from project A, even if you never use the object from project C? I guess it must have to do with the

Web Api: System.Net.Http version 2.0.0.0 not found

纵饮孤独 提交于 2019-12-07 03:36:05
问题 When I install the NuGet package for WebApi, it gives me version 1.0.0.0 of System.Net.Http, yet it references version 2. I cannot seem to find version 2 for the life of me. When I download .net 4.5 I get System.Net.Http version 4.0.315.x, but I cannot use that because the Web Api assemblies refer to version 2.0.0.0. Anyone know where I can find this version 2.0.0.0? I've tried the NuGet package manager, mvc4, .net 4.5, and nothing is giving me version 2. Thanks in advance. 回答1: Add the below