assemblies

How to get Namespace of an Assembly?

点点圈 提交于 2019-11-27 21:04:32
Consider i have an assembly(class library dll) which i have loaded using the following code, Assembly a = Assembly.LoadFrom(@"C:\Documents and Settings\E454935\My Documents\Visual Studio 2005\Projects\nunit_dll_hutt\for_hutt_proj\bin\Debug\asdf.dll"); and i need to get the type of the Assembly. In order to get the type i need the namespace of the assembly. Type t = asm.GetType("NAMESPACE.CLASSNAME",false,true); how can i get the Namespace in the above line.?! as inorder to get the Namespace , i need to get the type..? Type.Namespace; i.e i need to get the Namespace of the assembly which can be

How to build/deploy project that requires multiple versions of the same assembly?

一世执手 提交于 2019-11-27 20:53:09
I am working on a project that uses conflict.dll version 6.2, but the project also uses helper.dll that uses conflict.dll version 5.8. I could install 6.2 and 5.8 into the GAC, but I'ld like to have this project xcopy deployable. I believe .net will search for the assemblies in the application bin directory like so: \bin\conflict.dll (6.2) \bin\5.8\conflict.dll (5.8) But at this point, how do I add a reference to both versions of conflict.dll in the project, and then how do I make sure the old conflict.dll deploys to \bin\5.8? Do I create a build action or is there another way? Thanks In

How do I implement .net plugins without using AppDomains?

断了今生、忘了曾经 提交于 2019-11-27 20:19:30
Problem statement: Implement a plug-in system that allows the associated assemblies to be overwritten (avoid file locking). In .Net, specific assemblies may not be unloaded, only entire AppDomains may be unloaded. I'm posting this because when I was trying to solve the problem, every solution made reference to using multiple AppDomains. Multiple AppDomains are very hard to implement correctly, even when architected at the start of a project. Also, AppDomains didn't work for me because I needed to transfer Type across domains as a setting for Speech Server worfklow's InvokeWorkflow activity.

How to organize F# source of large project (>300 classes) in Visual Studio?

陌路散爱 提交于 2019-11-27 19:24:49
In C# you can put files in folders corresponding to their namespaces and view them in the Solution explorer. In F# it seems I have to put everything in plain specifically ordered list for compilation. When I get to scale of ~300 of classes it gets a bit confusing and disorganized and I start to envy C# and think that probably it is the price for type inference. Are there better options than splitting to several assemblies? Judging by F# compiler source its the route they have taken but I have pretty large system of interconnected components (Controller - ViewModel - View, > 300 classes) I want

AppDomain.CurrentDomain.AssemblyResolve asking for a <AppName>.resources assembly?

好久不见. 提交于 2019-11-27 19:23:21
using the code How to embed a satellite assembly into the EXE file provided by csharptest.net, I've created a custom assembly resolver and embedded my assemblies in my resources. I can successfully resolve my assemblies used in but somehow AppDomain.CurrentDomain.AssemblyResolve asks for an assembly called 'AppName.resources' specifically "MyProgram.resources, Version=0.15.3992.31638, Culture=en-US, PublicKeyToken=null" which i don't know how to resolve? I've tried to disable loading my custom assemblies from resources (placed all my assembly dll's in program directory) and just enabled

Is a Java package the equivalent of a .Net assembly?

試著忘記壹切 提交于 2019-11-27 19:17:37
I am a .Net developer starting Java development for Android and would like to know if it's correct to think of Java packages like .Net assemblies. No. The best comparison would be with a Java ARchive (Jar) file. Java uses packages to control the namespace, and is very similar to C#'s Namespaces. Here is how I'd compare the environments Java .Net ==== ==== Class Class Package Namespace Jar Assembly No, I think a Java package would be more similar to a namespace And an assembly would be more like a jar (I'm not so sure about this, as I'm much more familiar with Java than .Net... correct me if I

Gacutil.exe successfully adds assembly, but assembly not viewable in explorer. Why?

谁都会走 提交于 2019-11-27 18:04:55
I'm running GacUtil.exe from within Visual Studio Command Prompt 2010 to register a dll (CatalogPromotion.dll) to the GAC. After running the utility, it says Assembly Successfully added to the cache , and running gacutil /l CatalogPromotionDll shows that the GAC contains the assembly, but I can't see the assembly when I navigate to C:\WINDOWS\assembly from Windows Explorer. Why can't I see the assembly in WINDOWS\assembly from Windows Explorer but I can see it using gacutil.exe? Background: Here's what I typed into the command prompt for VS Tools: C:\_Dev Projects\VS Projects\bmccormack

Best practices for signing .NET assemblies?

这一生的挚爱 提交于 2019-11-27 17:17:39
I have a solution consisting of five projects, each of which compile to separate assemblies. Right now I'm code-signing them, but I'm pretty sure I'm doing it wrong. What's the best practice here? Sign each with a different key; make sure the passwords are different Sign each with a different key; use the same password if you want Sign each with the same key Something else entirely Basically I'm not quite sure what "signing" does to them, or what the best practices are here, so a more generally discussion would be good. All I really know is that FxCop yelled at me, and it was easy to fix by

Is there a ILMerge equivalent tool for Mono?

我的未来我决定 提交于 2019-11-27 16:01:44
问题 I'm looking for a open source tool to merge multiple .NET assemblies into a single assembly. 回答1: Check ILRepack, which allows merge of symbol files, xml documentation, App.config and more. It's open-source and based on Cecil. There is also NAnt and MSBuild integration for it in a project called ILRepack-BuildTasks . 回答2: mkbundle and monolinker: http://www.mono-project.com/Linker You can also make your own linker tool using Cecil: https://github.com/jbevain/cecil/wiki 回答3: Mono.Merge http:/

C#: How to load assembly from GAC?

那年仲夏 提交于 2019-11-27 15:08:20
I have "mycomp.myassembly.dll" in GAC but Load and LoadFrom throws file not found exception and LoadWithPartialName returns null. I'm doing the following: AssemblyName name = new AssemblyName(); name.Name = "mycomp.myassembly.dll"; Assembly assembly = Assembly.Load(name); fails with FileNotFound for mycomp.myassembly.dll file, and Assembly assembly = Assembly.Load("mycomp.myassembly.dll"); fails with exactly the same message. I double checked that assembly is in GAC (and even did gacutil /if for it again) and it does work in all other cases, I just unable to load it myself. What am I doing