Questions tagged [assembly.load]

40 questions
2
votes
3 answers

How do I load an assembly that references a Win32 DLL?

I am developing a .NET application that uses reflection to load plugins. My plugins are C# class libraries. The trouble is that some of my plugins reference conventional Win32 DLLs, and C# is blindly attempting to load the dependencies as if they…
Leo
1
vote
1 answer

Checking Mono.Cecil and Mono.Cecil.Cil

I have some code to load a exe file and shows its CIL code to user. To do it I use Mono.Cecil and Mono.Cecil.Cil. Now I wanna do something different: I wanna know if user has Mono.Cecil and Mono.Cecil.Cil in his system. to do that I thought to use…
carlesh
  • 537
  • 1
  • 4
  • 17
1
vote
1 answer

Allowing execution of extern interface implementations: what are the risks?

from writing ABAP programs, the following methodology is known to me as an 'exit' to a program, for this reason I choose the names accordingly. Suppose you, in .Net, 1) define an interface namespace Exits { public interface Exit { int…
Thomas
  • 1,160
  • 3
  • 16
  • 34
1
vote
1 answer

create new WinForm of an external project with Assembly.Load

I have 2 windowsForm projects (Project A and B) in C #, but I would like to add in Project B the reference to Project A by code and call Project A from within Project B. I used Assembly.Load and it is only working if I remove the Main void…
1
vote
0 answers

C# run byte array without dumping to temp file

I'm here to ask if anyone here can help me. I have been doing the following: Copy bytes from file Encrypt and convert bytes to string by using base64 Write the string to a program with a binary writer The program will pick up on the string and…
Lewis
  • 21
  • 4
1
vote
0 answers

c# How to programmatically load external assemblies with the same namespace

I have a "frontend" form application. In my application the user can chooses external dll assemblies from different directoryes: plugins_repository_directory | | first_item_directory | Plugin.dll | ... | | …
1
vote
3 answers

Assembly.Load throws a bad format exception if i load a winform application

this is the error code i get System.BadImageFormatException: impossible to load the file or assembly '6632 bytes loaded from quick test 2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Attempt to load a program…
user1909612
  • 273
  • 5
  • 14
1
vote
2 answers

Dynamically loading assemblies and their dependents using XCOPY deployment

I have an application loader that dynamically loads applications. An application is an assembly with all of its dependents in a single folder. Using XCOPY deployment I can add/remove applications by copying/deleting a folder. To facilitate standard…
michel
0
votes
1 answer

Meeting assembly dependencies in a MEF environment

I have an application in which I am employing MEF to dynamically load extension assemblies. One assembly is a domain layer, the second is a view. The domain assembly load and works as expected. The pseudo structure looks like…
0
votes
0 answers

.NET Framework plugin system - error on calling Assembly.GetExportedTypes()

We have a third party .NET Framework application that enables users to load their own plugins. Plugins are just standard .NET dlls that the application loads with Assembly.Load(). I'm trying to create a sort of subplugins system, where my plugin…
0
votes
0 answers

Partially Load Assembly into Byte Array

Is it possible to load the Assembly into Byte Array only partially, in the sense that: either: only specific class is loaded (e.g of given name and which implements given interface) or: whole assembly is loaded except specific class In my solution…
Lukasz
  • 11
0
votes
1 answer

How to assembly.load(byte[]) managed dll to memory, without touching the disk

Hello I am currently trying to resolve an issue regarding a software I am developing. What I want to achieve: Load a dll into the memory stream from a byte[] without WriteAllBytes (meaning that I want to avoid touching the disk). I have tried plenty…
0xyg3n
  • 33
  • 10
0
votes
0 answers

Assembly.Load vs Assembly.LoadFrom Casting (object must implement iconvertible)

I want to load an assembly for the purposes of a plug-in functionality whereby the loaded dll may be reloaded without restarting the application. I understand the easiest way to do this is to load the assembly using: Assembly assembly =…
0
votes
1 answer

C# "Assembly.LoadFile" & disable "DllImport" in loaded assembly?

In C#, Is it possible to dynamicaly load a .NET library at runtime with using something like System.Reflection.Assembly.LoadFile & disabling the loaded library from using [DllImport("someCPP.DLL", EntryPoint ="someFunction")] so that you can't call…
zezba9000
  • 3,247
  • 1
  • 29
  • 51
0
votes
1 answer

C# - Assembly.Load - Exception thrown: 'System.BadImageFormatException' in mscorlib.dll

I would like to make an experiment about running an EXE file from Resources. Assembly a = Assembly.Load(hm_1.Properties.Resources.HashMyFiles); MethodInfo method = a.EntryPoint; if (method != null) { method.Invoke(a.CreateInstance("a"),…
ItayNG
  • 11
  • 1