assemblies

Identifying Reflection.Emit-generated assemblies

Is there a simple way to identify Reflection.Emit-generated assemblies? When processing all assemblies loaded into an application domain, Assembly instances of dynamically generated assemblies don't behave the same as for standard assemblies. For example, accessing the CodeBase property leads to an exception: string codeBase; try { ...

Adding signed Assembly to nHibernate

Hello, I'm working with nHibernate. I have make an Assembly (ex : DAL.dll), which contains the mapping files (.hbm.xml) and the entities (.cs). This Assembly has a strong name (signed). I created a console project, which reference the DAL assembly (DAL.dll). When I try to instanciate the Configuration, it fails when loading my DAL As...

Signing my assembly with a strong name stops it from working

A colleague of mine created an assembly in VB.net for use with JScript via COM interop. The assembly used to work fine, but we signed it and now it only seems to work on Windows 7 machines. I've tested 2 Windows 7 machines and 2 Windows Vista machines. When we signed the assembly and we try to instantiate the ActiveX object in JScript...

Is a Java JAR file similar to an .Net Assembly?

I'm familiar with .Net and what assemblies are - but sadly my Java knowledge isn't as strong. I know Java and .Net are different "worlds" (possibly like comparing apples with pears) but are JARs and .Net Assemblies roughly eqivalent concepts? Edit: Update base on initial responses The way I interpret this is that yes they have similar...

Is there a way in VS 2010 to add a reference to an assembly that is only in your GAC?

Right clicking on project and clicking "Add Reference..." does not provide a way to do this. The .Net tab doesn't look in the GAC and if you browse to C:\windows\assembly you are presented with the actual directory structure of the GAC. Thanks! ...

Call a WCF Service from a SQL CLR procedure in C#

I'm trying to call a WCF Service from a SQL Stored Procedure written in C#. I saw various posts or questions on about the same topic : http://stackoverflow.com/questions/3502343/calling-a-wcf-service-from-sql-clr-stored-procedure http://stackoverflow.com/questions/751500/sql-clr-stored-procedure-and-web-service But there's something I ...

How does .NET know the dll is the same?

I wrote some sample code like this, all the outputs are the same, which is weird for me, I guess it makes sense if assembly1 is as same as assemly2, since the assembly information is the same(such as name, assembly version, GUID and etc.) however, I changed the assembly information and recompile the SampleCodedFormula.dll(then rename i...

Is there a way to figure out which .net symbols an assembly uses from a dependant assembly?

Given an assembly A, that refers to Assembly B, how can I figure out methodically all the symbols (classes, constants, enums, etc) that A uses from B? Is there any tool that can tell me that? PS: I need it to analyse how "entrenched" is the dependency ...

Bad to leave unused default assemblies in the reference folder?

There are usually some that I don't use in whatever project I'm working on (System.XML, System.XML.Linq for example). Are there any drawbacks from leaving default assemblies that I won't be using in my project? ...

Cannot add System.Web.dll reference

I'm trying to use the HTTP functions contained in the System.Web.dll assembly. However, whilst the dll seems to exist in the same directory as every other dll Visual Studio 2010 references in my project, it fails to link in and raises a warning - "The referenced component 'System.Web' could not be found". The dll, however, is definitely ...

fxcop fails because of references on obfuscated assemblies

Hello I need to run fxcop on a project that references an obfuscated commercial assembly (from dotnetremoting.com). Fxcop tries to load the obfuscated assembly and fails... I have got exactly the same problem with Mono Gendarme. It also tries to analyse referenced assemblies and fails. Thanks in advance for your responses Alex ...

How to verify assembly manifest

I need to check that the executable's manifest (either embedded or an external one) contain (besides all) the following fragment: <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.4053" processorArchitecture="x86" /> </dependentAssembly> </dependency> The first solution I ...

"bindingRedirect" in web.config does not work

Hello everybody, I'm using the "bindingRedirect" element in my web.config to allow updates of my referenced assembly without recompiling my website. But I still receive the same error: Could not load file or assembly 'Oracle.DataAccess, Version=2.111.6.20, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. Th...

Modify Assembly Version and References (.NET)

I have an application exe plus 3 referenced assemblies in a folder. Compiled in VS2010, CLR 4.0. I'd like to modify the version of all 4 assemblies to match (1.0.0.0) and also modify the reference section in each of those assemblies to match the new version number. Is that possible after the application was already build outside the ID...

.NET assembly information at runtime

I want to get information of assembly (classes in the assembly, methods and properties). The name of assembly will be entered through text box. For this i did like Assembly ass = Assembly.Load("System.Web") but it did't work. Sombody have solution for this? ...

Why would System.Type.GetType("Xyz") return null if typeof(Xyz) exists?

I have come across a strange behaviour in my (huge) .NET 4 project. At some point in the code, I am referring to a fully qualified type, say: System.Type type = typeof (Foo.Bar.Xyz); later on, I do this: System.Type type = System.Type.GetType ("Foo.Bar.Xyz"); and I get back null. I cannot make sense of why this is happening, becaus...

CLS compliant types in P/Invoke helper assembly

Having a separate helper assembly containing only P/Invoke declarations for legacy 3rd party components, I wonder which of these two ways is The Better One™ if the assembly must be marked CLS compliant: Use Int32 in a public P/Invoke declaration where the unmanaged declaration has unsigned int. Use UInt32 in an internal P/Invoke declar...

CS0246: Missing an assembly reference - works locally, but not on webserver.

I'm trying to implement a paymentgateway (Ewire, a danish payment gateway), and it works fine locally, but when I'm putting it online, it says I'm missing an assembly reference. I am sure that I'm using all the assembly references I need, since it works offline, and I'm also sure that the public class is registered (it's in my masterpag...

reflection is possible on obfuscation

I am struggling with this problem since last one week. I have obfuscated exe of my application. Our application is offline tool for online web application. Client will install this application and connect once to internet, application will download relevant information and store in xml file on client machine for further display. for secu...

APIs for compare assemblies .NET (Reflection, MSIL) programmatically

For example I have Assembly1.dll (1.0.0.0) and Assembly1.dll (1.0.0.0), in differents folders and I want to compare differences (if each assembly has the same Classes and each class the same methods, or compare all MSIL code). any APIs for do this? There are tools, like this http://stackoverflow.com/questions/652432/compare-compiled-net...