assemblies

Read AssemblyFileVersion from AssemblyInfo post-compile

How can one read the AssemblyFileVersion, or its components AssemblyFileMajorVersion, AssemblyFileMinorVersion, AssemblyFileBuildNumber, AssemblyFileRevision, within the .csproj, following compilation? I have tried the following which pulls the information from the built assembly: <Target Name="AfterCompile"> <GetAssemblyIdentity A...

.NET 1.1 assembly in .NET 2.0 project: Is .NET 1.1 required?

Hi, I am upgrading project from 1.1 to 3.5. There are some references left to .NET 1.1 assemblies. The question is: Do I have the requirement now to have both .NET 1.1 and 2.0 (3.5) on the deployed machine or it can be run without 1.1? Cheers, Dmitriy. ...

Do you strong name all assemblies your product uses?

I have a product which has around 10+ assemblies. We used to ship it without strongly naming the assemblies. But after reading about strong naming, I guess it is a wise idea to strong name assemblies. Just wanted to know is that a best practice to strong name all assemblies used by a program? Any thoughts? ...

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

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 implementati...

Programmatically add a strong named assembly to the GAC

Hello, Is there anyway to programmatically add a strong named assembly to the GAC using C# code ? Thanks ...

Why should I sign a .NET assembly?

Possible Duplicate: Best practices for signing .NET assemblies? Why should I sign a .NET assembly - what benefits does it bring as opposed to not signing it? ...

InternalsVisibleTo causes CS0246 error: The Type or Namespace could not be found.

I am trying to enable one assembly to access another assembly's internal classes by adding [assembly:InternalsVisibleTo("assembly-name")] to the second assembly. However, this causes the following error: error CS0246: The type or namespace name 'InternalsVisibleTo' could not be found (are you missing a using directive or an assembly...

AppDomains and licence files

Hi, We have a dll which uses a third party component, with embedded licence file (licx). now we are trying to use our dll in a windows service applicaiton, using mulitple appdomains. the code get compiled. but when im running it im getting an error message, saying cannot find the runtime licence. could someone explain me this. when us...

.NET Assembly Diff / Compare Tool - What's available?

I'd like to be able to do a code-level diff between two assemblies; the Diff plug-in for Reflector is the closest thing I've found so far, but to compare the entire assembly is a manual process requiring me to drill-down into every namespace/class/method. The other tools I've found so far appear to be limited to API-level (namespaces, c...

Is possible to persist data in the .net assembly Metadata or Header?

I want to implement a custom assembly signature mechanism just like Strong Name, then develop a program to write the signature info in the assembly Metadata,In the assembly of internal read and verification of the signature is correct. Is possible to do this? ...

how to load all assemblies from within your /bin directory

Hi, In a web application, I want to load all assemblies in the /bin directory. Since this can be installed anywhere in the file system, I can't gaurantee a specific path where it is stored. I want a List<> of Assembly assembly objects. ...

How can I patch .NET assemblies?

If I compile a C# project twice, I will get two assemblies. These assemblies aren't exactly the same (using a binary diff). I can think of reasons why this is so, but the fact remains that the source for the two assemblies are identical. I am concerned with creating a patch between these assemblies, and applying the patch on a customer...

When using reflection to get at properties, How can I limit my search to just the subclass I'm interested in?

After successfully getting a list of specific types out of an assembly using reflection, I now want to get at the public properties of each of those. Each of these types derives from at least one base class. I notice when I get properties on a type that I get properties from the base classes as well. I need a way to filter out base c...

Debug Build App locating Release CRT Assemblies

We have a c++ application which I recently ported from Linux/gcc to build on Windows with Visual Studio 2005. The app uses a 3rd party library which only provides DLLs which use the optimised CRT DLL (i.e. they don't provide equivalents which link to the debug CRT DLL). With VS2005 this didn't seem to be a problem = the debug build found...

How did Microsoft create assemblies that have circular references?

In the .NET BCL there are circular references between: System.dll and System.Xml.dll System.dll and System.Configuration.dll System.Xml.dll and System.Configuration.dll Here's a screenshot from .NET Reflector that shows what I mean: How Microsoft created these assemblies is a mystery to me. Is a special compilation process requir...

Encountering self recursive assembly references in the .NET framework.

I was writing some C# code recursively walking the referenced assemblies of a base assembly, building up a directed acyclic graph of these references to do a topological sort. I'm doing this by means of the GetReferencedAssemblies() method on the Assembly class. While testing the code, I found - to my surprise - that some assemblies in ...

Maven-assembly-plugin: custom jar filenames

I use the assembly plugin to create several jars with some classes in it. I need custom names for the resulting jars: *app_business.jar* *app_gui.jar* core.jar etc. Currently I have to following configuration: <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <appendAssemblyId>false</appendAs...

What are Side-by-side Assemblies?

I came across Side-by-side Assemblies for the first time today while trying to install a Debug install set to a test machine. I managed it in the end, but was left with several questions: Whare are Side-by-side assemblies? How does Windows deal with these assemblies differently from other assemblies How do applications depending on Sid...

Automatic reference of class files inside App_Code vs reference of class files outside App_Code

Hi, all questions refer to Web site projects. 1) Why are file classes inside App_Code folder automatically referenced by the rest of application, while file classes created outside App_Code aren’t? 2) I don’t know much about compilation, but why do we need to explicitly reference class files created outside App_Code? Because those...

Ignore missing dependencies during ReflectionOnlyLoad

I am working on a simple class browser dialog that allows users to open an assembly and choose a static method from within. However, there are some situations where the assembly's dependencies are missing. Since I only need the method name and not its full prototype, is there any way to get past the FileNotFoundException that is raised ...