Per MSDN, calling Type.GetMethods() stores reflected method information in a MemberInfo cache so the expensive operation doesn't have to be performed again.
I have an application that scans assemblies/types, looking for methods that match a given specification. The problem is that memory consumption increases significantly (especially ...
I have a 3rd party library (A). That library is referenced in my Silverlight class library (B). That Silverlight class library is referenced in my Silverlight application (C). The 3rd party library is not explicitly referenced in the Silverlight application.
It seems that "A" is added to my XAP if "A" is used in any class in "B" because...
I'm trying to load an assembly that was installed as part of .Net 3.5 SP1 using Assembly.Load() by referencing its strong name. This works fine on my computer right now, but is it future proof?
Will the strong name of core .Net assemblies change when patches are installed or new versions of the .Net framework are released?
Edit: If .Ne...
I like to adhere to StyleCop's formatting rules to make code nice and clear, but I've recently had a problem with one of its warnings:
All using directives must be placed
inside of the namespace.
My problem is that I have using directives, an assembly reference (for mocking file deletion), and a namespace to juggle in one of my t...
I'm curious - does the listing of assemblies in the Add Reference dialog vary depending on the version of the .Net framework used for the selected project. If they do differ, I'd love to know where the differences lie. Thanks!
...
Is it possible to rename a namespace name in an existing API without breaking users code?
...
Hi,
I have a few classes in the class library (separate assembly). I referenced it to my project and I want to initialize one specific class from that library. I know only its name. All of the classes implements one interface.
And here comes the problem.
My code so far:
using MyLibrary;
...
IMyInterface dll = Activator.CreateInstance("...
I have a windows service which runs like a scheduler, it extends an interface which can be implemented by other classes to become plugin to this service. All plug-ins (eg Plugin1, Plugin2...) would be dropped in sub folder of PlugIn such as PlugIn\Plugin1, PlugIn\Plugin2 respectively. At runtime each of the subfolders (Plugin1, Plugin2) ...
I have the following class located in Assembly A. The assembly has a reference to StructureMap 2.6.1.
public static class Bootstrapper
{
public static void Bootstrap(string databaseName)
{
StructureMapBootstrapper.Bootstrap(databaseName);
}
}
I'm referencing Assembly A in a completely different Assembly (B) and I"m...
I have a VS solution (.sln) that has the following structure.
Project A
Project B (contains reference to Project A as well as references to 3rd party assemblies like NHibernate, StructureMap, etc)
I want to use ILMerge to roll the 3rd party assemblies into the ProjectB.dll. However, I don't want to merge ProjectA.
I've used the pr...
I am a C# .net developer/architect and I am learning powershell.
I have the basics down packed and understand that it uses objects (.Net objects) and not just streams/text.
I would like to be able to use powershell to call methods on my .net (C# library) assembies.
How do I reference an assembly in powershell and use the assemlbY?
...
Hi,
I have to parse (for localization purpose) .NET assemblies and create satellite assemblies. Currently, I take all the resources from the base assembly, parse them, and then create the satellite assembly. Most of the parts are solved, but if I parse an assembly containing a .xml public resource, when embedding the translated xml into...
Is there a way to scan all the assemblies in the GAC and return a list of names of assemblies with a specified Public Key Token during runtime? I know the Public Key of all the GAC assemblies that I am interested in loading, but don't necessarily know the names or version numbers.
...
I have a web application written in C# and running as a dll under IIS.
I also have some common code compiled to a separate assembly (dll). This common code contains a function that returns version information (as below). How can I modify this code so it returns the version information of the web app dll and NOT the common code dll a...
I am trying to register a type conversion in my config file as follows:
<param name="connectionString" parameterType="System.String">
<value value="MyDbConnection"
type="System.Configuration.ConnectionStringSettings"
typeConverter="ConnectionStringSettingsTypeConverter" />
</param>
I am getting the standard can't...
I have a class library with a bunch of classes and I would like to compile each of my classes into its own assembly. Is that possible?
...
I have scenario where my loose xaml file can contain the custom control from another assembly. How do i make a reference to that assembly. My Loose XAML and assembly are at the same path.
I know the embedded xaml or xaml with in a project, the reference is added like this:
xmlns:WpfToolKit="http://schemas.microsoft.com/wpf/2008/toolkit"...
I'm working with dependency injection (DI from now on) to resolve components and am looking for an elegant solution to loading dependent assemblies in a .NET environment. As an explanation, lets say that we have 3 assemblies, A, B and C, where A depends on B and B depends on C. Now I need to load components from assembly A, but because I...
I have three pieces of code that i'm working with at the moment:
A closed source application (Main.exe)
A closed source VB COM object implemented as a dll (comobj.dll)
Code that I am developing in Python
comobj.dll hosts a COM object (lets say, 'MainInteract') that I would like to use from Python. I can already use this object perfec...
Hey all,
My program (a console application) references several other assemblies (many open-source libraries). I built the assembly with the "Any CPU" option set (using VS2008). When I start the assembly from a 64-bit command prompt on a Windows Server 2008 x64 machine the process always starts as a 32-bit process!
I looked through my...