assemblies

How to show all ASP.NET web application's loaded/referenced assemblies with version numbers?

I'd like to show a list of all used assemblies on a dedicated web page inside a ASP.NET web application for debugging and maintainance purposes (there are many instances of this web application on many different servers). The assemblies could be called from the bin folder or from the GAC. There are some written by myself, but also third-...

Loading Assembly only once

I'm loading an assembly at runtime and the question that arises everytime I call the code is that should I be checking if that particular assembly has loaded already? or does .Net take care of this and one assembly (same version) can only be loaded once? The basic question here is do i have to iterate through a list of loaded assemblies ...

Weird behaviour when mixing loading of assemblies using Assembly.LoadFrom and Assembly.Load

Weird behavior when mixing loading of assemblies using Assembly.LoadFrom and Assembly.Load I have encountered a weird behavior when loading assemblies with Assembly.LoadFrom and later on with Assembly.Load. I am loading an assembly using Assembly.LoadFrom, where the assembly is located in a folder which is not the execution folder. La...

Web App Compiling Error - ASP.NET Reference

My current web app works fine locally and on live, what i am currently playing around with is compiling my Web App with the Visual Studio Option "Add Web Deployment Project" so all the code behind is compiled into DLL's. There's is one particular build error i can not get rid off Error 50 The type or namespace name 'usercontrols_calend...

how to delete the pluginassembly after AppDomain.Unload(domain)

hello, i have a weird problem. i would like to delete an assembly(plugin.dll on harddisk) which is already loaded, but the assembly is locked by the operating system (vista), even if i have unloaded it. f.e. AppDomainSetup setup = new AppDomainSetup(); setup.ShadowCopyFiles = "true"; AppDomain appDomain = AppDomain.CreateDomain(asse...

How do you install files in the assembly in Windows Server 2008?

Typically what I used to do is drag and drop the files onto the GAC folder. This works in Windows 2000 & 2003, however when I try to do this in Windows Server 2008 I get 'Access is denied'. The user that is doing this is a local administrator. The only reference I can find to this is: Forum link Is there another way to achieve this? ...

ASP.NET: WebResource.axd call 404 error: how to know which assembly/resource is missing or responsible?

I get a 404 HTTP status error (not found) on a specific WebResource.axd call inside an ASP.NET 3.5 (AJAX) web application. I guess the error is thrown because a specific referenced assembly is missing in the bin folder/GAC. But I don't know which, since the page which requests the resource is very complex (I'm using third-party controls ...

VS2005: Assembly '<assembly>' is incorrectly specified as a file.

i've added a reference to the log4net assembly dll to my project. When i build i get a warning saying: Warning Assembly 'Lib\log4net.dll' is incorrectly specified as a file. i look up the help for this error on MSDN, and it says: This warning is generated during application manifest generation when the build process de...

How can I reference a dll in the GAC from Visual Studio?

This assembly is in the GAC: Microsoft.SqlServer.Management.RegisteredServers.dll How can I add a reference to this assembly in Visual Studio? I can view the file in c:\windows\assembly\ ...

How to Get a List of Assemblies in csharp?

I need to get a list of assemblies in a Directory, Is there another way than this System.IO.Directory.GetFiles(directory, "*.dll") ...

Why I have to use fully qualified assembly name for local assemblies?

In many places, like in app.config/web.config files I have to specify types using this verbose fully qualified names, like <add name="myListener" type="System.Diagnostics.TextWriterTraceListener, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> This MSDN site says, that Partial binding, which speci...

"Are you missing an assembly reference?" compile error - Visual Studio

I am currently working on a server control for other applications in our company to interface with a WCF service. Every time I make a change code change and recompile the control, I increment the the AssemblyVerison and AssemblyFileVersion class in the AsseemblyInfo.cs by one. For example, my latest build went from 1.0.07.0 to 1.0.08....

GAC Assembly naming (ASP.Net 2 + IIS7 + Windows Vista Home Premium)

I have a membership provider assembly that I wish to add to IIS7. I was going to leave this in the App_Code file for the web app, but IIS7 has asked me to provide a strong name assembly, which I have. Now I get this when trying to acccess ASP.Net Users in IIS The assembly name or codebase was invalid. Exception from HRESULT 0x80131047...

How to inherit a class from an assembly without forcing users to reference two assemblies

I have two classes A and B in two different .NET assemblies: AssemblyA and AssemblyB. I want class B to inherit class A but I want that however uses class B to only need to reference AssemblyB (and not both AssemblyA and AssemblyB). Due to the project constraints I need to keep the two assemblies separate so I cannot use merge tool to ...

How do I list all loaded assemblies?

In .Net, I would like to enumerate all loaded assemblies over all AppDomains. Doing it for my program's AppDomain is easy enough AppDomain.CurrentDomain.GetAssemblies(). Do I need to somehow access every AppDomain? Or is there already a tool that does this? ...

How do I implement .net plugins without using AppDomains?

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

Initialize library on Assembly load

I have a .net library dll that acts like a functional library. There are a bunch of static types along with static methods. There is some initialization code that I need to run to set up the library ready for use. When the assembly gets loaded is there a way to ensure that a particular method is run? Something like AppDomain.AssemblyLo...

Clarification needed: How does .NET runtime resolve assembly references from parent folder?

...

Type.GetType() for a class that resides in an unreferenced assembly

GetType() returns null when the type exists in an unreferenced assembly. For example, when the following is called "localType" is always null (even when using the full namespace name of the class): Type localType = Type.GetType("NamespaceX.ProjectX.ClassX"); I don't see any reason why Type.GetType shouldn't be able to retrieve a type...

C# Load assemblies at runtime

Hi Is it possible to instantiate a object at runtime if I only have the DLL name and the class name, without adding a reference to your project ? eg. DLL name : library.dll and class name : Company.Project.Classname The class implements a interface, so once I instantiate the class, I will then cast it to the interface. EDITED : I do...