using System;
namespace AssemblyResolutionDemo
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(
FullName.NonGAC.FullName.GetFullName("John", "Smith")
);
Console.WriteLine(
typeof(FullName.NonGAC.FullName).Assembly.CodeBase
);
Console.Read();
}
}
}
using System;
namespace FullName.NonGAC
{
public class FullName
{
public static string GetFullName(string firstName, string lastName)
{
return string.Format("{0}, {1}", firstName, lastName);
}
}
}
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="MyDLLs" />
</assemblyBinding>
</runtime>
</configuration>
Note: one can define multiple folder paths using a semi-colon (;).
<probing privatePath="MyDLLs; DLLs;" />
Referenced assemblies outside the application's root directory must have strong names and must either be installed in the global assembly cache or specified using the <codeBase> element.
—MSDN
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)