Am developed C# application for creating dll for some functionality,am creating two dll's at a time,for example Dll A and Dll B.
This Dll A is reference of Dll B.
So how to call Dll A from Dll B.
Am using following code for this, but i got error message.
the Code is
public class Proxy : MarshalByRefObject
{
public Assembly GetAssembly(string assemblyPath)
{
try
{
return Assembly.LoadFile(assemblyPath);
}
catch (Exception)
{
return null;
// throw new InvalidOperationException(ex);
}
}
}
string dynamicClassPath = File Path;
AppDomain domains = AppDomain.CreateDomain("New domain name");
Type type = typeof(Proxy);
Proxy myObject = (Proxy)domains.CreateInstanceFromAndUnwrap(dynamicClassPath, type .FullName);
Could not load type 'FolderName.FileName+Proxy' from assembly 'Dynamic_id, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Quote:
here
Dynamic_id
is a dll.
for deep explanation
Dll A and B both are created dynamically.
The Following code in Dll A
The Following code in Dll A
using System;
namespace ForTest
{
public class Dynamic_Val_001
{
private string _Prop_Name;
private string _Prop_Address;
public virtual string Prop_Name
{
get
{
return this._Prop_Name;
}
set
{
this._Prop_Name = value;
}
}
public virtual string Prop_Address
{
get
{
return this._Prop_Address;
}
set
{
this._Prop_Address = value;
}
}
}
}
the Dll B code is
using System;
namespace ForTest
{
public class Val_001
{
public virtual Tuple isValid(Dynamic_Val_001)
{
return new Tuple(false, "Success");
}
}
}
Now the Dll B have a one tuple bool function with one parameter, In that parameter is Dll A class name,so Dll B is depends on dll A.
So how to Call that Dll A class from Dll B.
so pls help me how to do this??
sorry my poor English.
sorry my poor English.

sathish kumarPosted Jan 22, 2016, 1:58 AM
Praveen DhatrikaPosted Jan 21, 2016, 2:36 PM
2. Both of these applications use shared assembly shared.dll
3. Now, I have a latest version of Application - A2 available on the internet.
4. I download the latest version of A2 and install it on my machine.
5. This new installation has over written Shared.dll, which is also used by Application - A1.
6. Application - A2 works fine, but A1 fails to work, because the newly installed Shared.dll is not backward compatible.
So, DLL HELL is a problem where one application will install a new version of the shared component that is not backward compatible with the version already on the machine, causing all the other existing applications that rely on the shared component to break. With .NET versioning we donot have DLL HELL problem any more.