assemblies

.Net Assembly Hell

I am Trying to develop a .Net Web Project using NHibernate and Spring.net. But I'm stuck. Spring.net seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and my NHibernate version is 1.2.0.4000). I solved some problems with the "bindingRedirect" TAG, but now even that stopped working. My Questi...

Where can I find Microsoft assemblies that are not already in Visual Studio?

I figured someone can answer the question generally but if anyone wants to get specific I am trying to use: using System.Web.Security.SingleSignOn; using System.Web.Security.SingleSignOn.Authorization; I've googled my brains out and this is the closest answer I found: "We discussed this offline, but it looks like the ADFS assembly is ...

How to load a specific version of an assembly

To complete some testing I need to load the 64 bit version of an assembly even though I am running a 32 bit version of Windows. Is this possible? ...

Modifying Existing .NET Assemblies

Is there a way to modify existing .NET assemblies without resorting to 3rd party tools? I know that PostSharp makes this possible but I find it incredibly wasteful that the developler of PostSharp basically had to rewrite the functionality of the whole System.Reflection namespace in order to make existing assemblies modifiable. System.R...

How can I pass an argument to a C# plug-in being loaded through Assembly.CreateInstance?

What I have now (which successfully loads the plug-in) is this: Assembly myDLL = Assembly.LoadFrom("my.dll"); IMyClass myPluginObject = myDLL.CreateInstance("MyCorp.IMyClass") as IMyClass; This only works for a class that has a constructor with no arguments. How do I pass in an argument to a constructor? ...

Assembly.Load and Environment.CurrentDirectory

I realize there is a somewhat related thread on this here: http://stackoverflow.com/questions/22012/loading-assemblies-and-its-dependencies But I am modifying something and this doesn't exactly apply. string path = Path.GetDirectoryName( pathOfAssembly ); Environment.CurrentDirectory = path; Assembly.Load(Path.GetFileNameWithoutExte...

Why should you remove unnecessary C# using directives?

For example, I rarely need: using System.Text; but it's always there by default. I assume the application will use more memory if your code contains unnecessary using directives. But is there anything else I should be aware of? Also, does it make any difference whatsoever if the same using directive is used in only one file vs. most/...

Managing third party libraries and their dependencies

Specifically, how do you handle 2 different libraries sharing a common dependency? For example, I've structured a project with a Lib\ directory with each 3rd party library (and its dependencies) contained in separate sub-directories: Lib\ IBatis\ Log4Net\ etc. This is fine if there's no overlap. Required libraries are added ...

What is a private assembly in .Net?

I understand access modifiers at the class level and below, but why would an entire assembly be private? I assume by default, assemblies are public? ...

In .NET is there a way to enable Assembly.Load tracing?

In .NET is there a way to enable Assembly.Load tracing? I know while running under the debugger it gives you a nice message like "Loaded 'assembly X'" but I want to get a log of the assembly loads of my running application outside the debugger, preferably intermingled with my Debug/Trace log messages. I'm tracing out various things in ...

Automatic Update and checkin of AssemblyInfo.cs files occasionally causes partial fail

We have TFS 2008 our build set up to checkout all AssemblyInfo.cs files in the project, update them with AssemblyInfoTask, and then either undo the checkout or checkin depending on whether the build passed or not. Unfortunately, when two builds are queued close together this results in a Partially completed build as the AssemblyInfo.cs ...

What is the best way to use assembly versioning attributes?

The AssemblyVersion and AssemblyFileVersion attributes are the built-in way of handling version numbers for .NET assemblies. While the framework provides the ability to have the least significant parts of a version number (build and revision, in Microsoft terms) automatically determined, I find the method for this pretty weak, and no dou...

How to read assembly attributes

In my program, how can I read the properties set in AssemblyInfo.cs: [assembly: AssemblyTitle("My Product")] [assembly: AssemblyDescription("...")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Radeldudel inc.")] [assembly: AssemblyProduct("My Product")] [assembly: AssemblyCopyright("Copyright @ me 2008")] [assembly:...

How do I get the version of an assembly without loading it?

One small function of a large program examines assemblies in a folder and replaces out-of-date assemblies with the latest versions. To accomplish this, it needs to read the version numbers of the existing assembly files without actually loading those assemblies into the executing process. ...

How to determine if an assembly is in use?

How can I tell if an assembly is in use by any process? ...

How can I create a custom Property for my assembly?

How can I create a custom property for my .Net assembly which would then be visible under the Details tab in Windows explorer? Something to sit parallel with "File Description", "Type", "Product Version"... etc Update: To quote my comment to Lars ... "Whilst I would have liked to do this from within Visual studio, that is certainly not...

Best practices for assembly naming and versioning?

I am looking out for some good practices on naming assemblies and versioning them. How often do you increment the major or minor versions? In some cases, I have seen releases going straight from version 1.0 to 3.0. In other cases, it seems to be stuck at version 1.0.2.xxxx. This will be for a shared assembly used in multiple projects a...

Embedding Intellisense Xml Documentation in Assembly?

I have an assembly containing very thorough XML-based documentation, which is used through Sandcastle to generate the help-files for the product. We also use the output XML files for providing proper Intellisense in Visual Studio when programmers use the assembly obviously. In order to do this, it seems we have do both supply the user w...

What is the best practice for compiling Silverlight and WPF in one project?

I've just completed a Silverlight project and it's time to have a little clean up. I'd like to take my core files and put them into a separate project which I will reference from my main Silverlight app. Some of these classes are compatible with WPF and I would quite like to be able to have Silverlight / WPF code all in one project. My i...

Assembly "is not signed correctly." Warning

I have a mobile .NET solution and decided to sign the assemblies. Compilation completes without errors but gives the warning 'CompactUI.Business.PocketPC.asmmeta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not signed correctly. The application is working fine but I can't open the designer for forms using this assembly an...