assemblies

Resolving/using multiple assembly versions from 3rd party dependencies

十年热恋 提交于 2019-12-07 07:01:44
问题 In my project, I have a problem with its dependency hierarchy. I use a library (WriteableBitmapExtensions) in my code, and I have another 3rd party library which also uses WriteableBitmapExtensions. Only the other library is strongly tied to a specific, older version, and my code needs the functionality in its latest version. Here's a depiction of the dependencies: There are similar questions & solutions but they resolve it with assembly binding at runtime via a config file, but I don't think

Does order matter when registering, gac-ing assemblies for COM interop?

≡放荡痞女 提交于 2019-12-07 06:45:13
问题 When registering .NET assemblies for COM Interop, I do two things, currently in this order: regasm /tlb:MyDll.tlb Mydll.dll gacutil /i Mydll.dll I use regasm to register the type library for COM and gacutil to install the assembly into the GAC. Does it matter which order I do these two actions? Also, as I make updates to my dll, do I need to un-register and re-register it, uninstall it from the gac and re-install it, both or neither? 回答1: Does order matter? No. Do you need to reinstall in GAC

Why are framework dlls repeated in several places?

跟風遠走 提交于 2019-12-07 03:26:43
问题 After installing .Net 4 and getting some questions that were already answered here I also realized how the Framework dlls are repeated in several places for the different Framework versions (this is not new, it happens with previous versions, but hadn't paid attention to it until now) 1 - GAC: %systemroot%\assembly 2- Framework installation directory: %systemroot%\Microsoft.NET\Framework\v... 3- and if you have the Windows SDK installed, also in: C:\Program Files\Microsoft SDKs\Windows\ I

Type.GetType fails to create type from already loaded assembly

安稳与你 提交于 2019-12-07 02:49:55
问题 I have program which loads an assembly using Asssembly.LoadFrom method. Some time later I attempt to use Type.GetType to create a type from that assembly (using AssemblyQualifiedName ), but the method returns null . If I set it to throw exception, it tells Could not load file or assembly '...' or one of its dependencies. The system cannot find the file specified. But I am sure the exact same assembly is already loaded (it shows in the AppDomain.CurrentDomain.GetAssemblies() list). Anybody has

Preloading Assemblies

拈花ヽ惹草 提交于 2019-12-07 01:15:21
问题 At work we use DevExpress for the user interface. The first time a form employing a DevExpress control is opened there's a long pause (sometimes 15-20 sec on some clients). In Visual Studio i can see that tons of assemblies are being loaded during that phase. Is there a way to preload that assemblies into the AppDomain in the background on a thread that is spawned for example before the login screen pops up? 回答1: Another choice is to force the JIT to load the assemblies asynchronious instead

Determine Loaded Assemblies

隐身守侯 提交于 2019-12-07 00:18:32
问题 How can I determine all of the assemblies that my .NET desktop application has loaded? I'd like to put them in the about box so I can query customers over the phone to determine what version of XYZ they have on their PC. It would be nice to see both managed and unmanaged assemblies. I realize the list will get long but I plan to slap an incremental search on it. 回答1: using System; using System.Reflection; using System.Windows.Forms; public class MyAppDomain { public static void Main(string[]

Why is assembly binding redirect not working in my web site?

白昼怎懂夜的黑 提交于 2019-12-06 18:22:00
问题 I have a web site project that I run from Visual Studio using the built in development web server. The virtual path of the web site is set to / The web.config contains a runtime element with <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="CMS.Controls" publicKeyToken="834b12a258f213f9" culture="neutral" /> <bindingRedirect oldVersion="4.1.3518.21577" newVersion="4.1.3561.21846" /> </dependentAssembly> </assemblyBinding> <

How can i see the assembly version of a .NET assembly in Windows Vista and newer (WIndows 7, 2008)?

时光怂恿深爱的人放手 提交于 2019-12-06 18:11:17
问题 In windows 2003 and windows XP you could right click on an assembly (.dll) go to properties, click on the version tab and then you would see 3 different version numbers: Assembly version, file version and product version. If you take that same file and look at its properties in windows 2008, you will only see file version and product version. Is there a way to see the assembly version of a .NET assembly in windows vista and newer (without third part tools)? 回答1: No. Not from explorer. It is

how can I embed an assembly into a console application without ILMerge?

怎甘沉沦 提交于 2019-12-06 16:56:57
There are a lot of posts on here about this, I'm using this code from another SO post and placing a delegate assignation in my Main() method. None of the other posts have directly answered my question. I've got my third party assembly embedded as a resource but when I fire up the app: I'm getting a TypeInitializationException with an inner of FileNotFoundException. It's trying to find the assembly on the file system and failing. it's never getting to the Main method, where the event handler for AssemblyResolve is assigned I have two assembly refs that are embedded in my Resources.resx, one is

Load and unload a dll dynamically into my project using AppDomain

。_饼干妹妹 提交于 2019-12-06 16:15:18
问题 I want to use a class from a different project in a separate solution in my current project dynamically. I thought the solution is to load the dll into my project. I used the following code to do my task and it worked. string dllPath = @"the path of my dll"; var DLL = Assembly.LoadFile(dllPath); foreach (Type type in DLL.GetExportedTypes()) { if (type.Name == "targetClassName") { var c = Activator.CreateInstance(type); try { type.InvokeMember("myMethod", BindingFlags.InvokeMethod, null, c,