assemblies

How to make an external assembly available at runtime?

守給你的承諾、 提交于 2020-01-07 06:42:12
问题 I asked a question here and apparently the problem is where I can load an assembly using Reflection's Assembly.LoadFile or Assembly.LoadFrom , and get the type inside that assembly, the assembly is still not accessible in the whole application. So when WPF tries to resolve a type, it doesn't find that type because it doesn't find the assembly. My question is, can I reference an assembly at runtime, so that it will be resolvable by WPF? 回答1: A solution that works for me is handling the

Load multiple assemblies

不羁的心 提交于 2020-01-07 03:51:13
问题 How can I load an assembly using its full display name from a location outside the application's bin path? Usually one can load an assembly from a custom location with Assembly.LoadFrom(path); This works, but it seems that for loading a strong-named assembly I need to specify its full display name such as in Assembly myDll = Assembly.Load("myDll, Version=1.0.0.1, Culture=neutral, PublicKeyToken=9b35aa32c18d4fb1"); But the problem here is that this only references assemblies that are in my

Register assembly in ASP.NET (VS 2005) and web.config

偶尔善良 提交于 2020-01-06 16:42:41
问题 I am applying a new version of an assembly to a web project and have found that I am going to have to replace about 500 instances of the Register Assembly tag at the top of each web control. I considered registering it in the web.config but when I try this and remove the "Register" tag from the controls, i receive the "unrecognized tag prefix" error as well as losing intellisense for that tag. I have not GAC'ed the assemblies but i didnt think that would a problem. What am I missing here?

Can I specify dependency directories when dynamically loading assemblies?

纵然是瞬间 提交于 2020-01-05 07:26:33
问题 I'm wondering if a setup like this is possible: c:\eflow\proxy.dll (main DLL loaded by application) c:\eflow\application\dynamic.dll (DLL dynamically loaded by proxy.dll) c:\eflow\dependency.dll (dependent DLL required by dynamic.dll) Basically, I'd like to dynamically load a DLL (to instantiate classes, etc) but have that DLL's dependencies stored in a different location. Is this possible? I don't want to have a copy of these dependent DLLs in every sub-directory... (and I can't load them in

Any reason why NGEN should hang and never complete for a particular assembly?

穿精又带淫゛_ 提交于 2020-01-04 14:12:49
问题 I have a class library project for .NET 3.5 built with Visual Studio 2008. If I try to NGEN the core assembly in this solution file, NGEN never completes, or at least not in the time I've bothered to let it run (like overnight). Has anyone else experienced this? And if so, did you solve it? And if you did, how? What steps did you take? If this is a bug in NGEN, how do I post this to Microsoft? I have a connect account, but where do I post a bug-report for this particular product, instead of a

Any reason why NGEN should hang and never complete for a particular assembly?

旧街凉风 提交于 2020-01-04 14:12:32
问题 I have a class library project for .NET 3.5 built with Visual Studio 2008. If I try to NGEN the core assembly in this solution file, NGEN never completes, or at least not in the time I've bothered to let it run (like overnight). Has anyone else experienced this? And if so, did you solve it? And if you did, how? What steps did you take? If this is a bug in NGEN, how do I post this to Microsoft? I have a connect account, but where do I post a bug-report for this particular product, instead of a

Optimize finding all classes implementing IInterface<T> and those explicitly implementing it with a specific type

送分小仙女□ 提交于 2020-01-04 10:16:10
问题 I have an interface ISerializeDeserialize defined and some classes inheriting the generic interface. I also have some code generated assemblies using the CodeDomProvider which generates classes inherited from the same interface but implementing it with a specific Type. What I want to achieve is getting a list of the generic implementations and those implementing the specific type. You can let T=int in the code below. To get all classes implementing ISerializeDeserialize of some type I so far

How to prevent EF4 from dynamically loading all assemblies

两盒软妹~` 提交于 2020-01-04 07:00:28
问题 We use ClickOnce with dynamic assembly loading. I recently added an EF4 model to a "Model" project within the solution. The application must not use the app.config file for it's connection string, so I create the ObjectContext using an EntityConnection. The application logic works perfectly, however, when you create an instance of the ObjectContext when the application is deployed using ClickOnce, EF4 tries to dynamically load all of the associated assemblies to find the metadata. This forces

registering a dll in GAC

你离开我真会死。 提交于 2020-01-04 00:57:28
问题 I need to add an dll to GAC on Windows 2003 server. The server doesn't have Visual Studio installed. I didnt find Gacutil.exe in Windows 2003 Server. Where can I find Gacutil in Windows 2003 Server. Is there any other way I can add a dll to GAC . Any help will be highly appreciated. Thanks in Advance, 回答1: While you can't (re: shouldn't) use GACUtil.exe, there are 2 other ways, outlined in the following link from msdn: http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx What you're looking

Multiple Assembly.Load(Byte[]), same instance or leak?

北战南征 提交于 2020-01-03 17:51:48
问题 What happens when I call Assembly.Load(Byte[]) multiple times with a Byte array containing the same assembly ? Will I get the same instance of Assembly for each call ? The same assembly loaded multiple times within the app domain ??? 回答1: You will get a new Assembly object with each call, read the documentation, there is a note near the end: "Note that this method overload always creates a new Assembly object with its own mapping." 来源: https://stackoverflow.com/questions/1554404/multiple