Gents,
According to MSDN, the Load method of the Assembly class SHOULD accept the
long form of the assembly name. To quote the MSDN topic:
<Quote>
Assembly SampleAssembly;
// You must supply a valid fully qualified assembly name here.
SampleAssembly = Assembly.Load("Assembly text name, Version, Culture,
PublicKeyToken");
</Quote>
The original poster should use the Fusion Log Viewer (fuslogvw.exe) utility
to examine which locations the loader probes for the assembly - the thing
might be the loader is not aware of the location where the assembly in
question resides.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"Alexander Wehrli" <Al*************@discussions.microsoft.com> wrote in
message news:E4**********************************@microsof t.com...
Hi,
This is because the FullName gives you a string like this:
trlcxml, Version=1.0.1705.13332, Culture=neutral, PublicKeyToken=null
So this isn't really the name of your assembly =D
What you can do is take the first part of the string (in my case trlcxml)
--> this is the name of your dll (without extension). Or (what I actually
prefer), you create an own class that contains either the assembly AND for
example a FileInfo Object of your assembly.
Regards kahuna
"Aashish Patil" wrote:
Hi,
My code is trying to load an assembly using
Assembly.Load(string assemblyName);
Assume that the current executing assembly is called
Test.dll
The following code works fine
string assName = "Test.dll"
Assembly.Load(assName);
While the following fails consistently
Assembly.Load(Assembly.GetExecutingAssembly().Full Name);
The second piece of code always throws an exception saying
that assembly was not found. Note that FullName also
includes attributes such as Culture,Version, ... I wonder
why that should make a difference.
Any ideas?
Thanks
regards,
Aashish