Strong name trouble

  • Thread starter Thread starter Tamir Khason
  • Start date Start date
T

Tamir Khason

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named. Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...
 
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named. Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]
 
No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]
 
Just a guess, do any of the types have a base type that is in another assembly that is not a system assembly?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]
 
All of those types implements shared interfaces which inherits from global
base interface



Richard Blewett said:
Just a guess, do any of the types have a base type that is in another
assembly that is not a system assembly?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]
 
OK, but is that interface declared in another assembly and if so, does it have a string name or not?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>


All of those types implements shared interfaces which inherits from global
base interface



Richard Blewett said:
Just a guess, do any of the types have a base type that is in another
assembly that is not a system assembly?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]
 
obviously "string" should say "strong" there

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

OK, but is that interface declared in another assembly and if so, does it have a string name or not?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>


All of those types implements shared interfaces which inherits from global
base interface



Richard Blewett said:
Just a guess, do any of the types have a base type that is in another
assembly that is not a system assembly?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]

[microsoft.public.dotnet.languages.csharp]
 
yes

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
obviously "string" should say "strong" there

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

OK, but is that interface declared in another assembly and if so, does it
have a string name or not?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>


All of those types implements shared interfaces which inherits from global
base interface



Richard Blewett said:
Just a guess, do any of the types have a base type that is in another
assembly that is not a system assembly?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My
Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable
to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

message
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the
error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]

[microsoft.public.dotnet.languages.csharp]
 
So, the interfaces are declared in a separate strong named assembly. Is this assembly in the GAC or is it int he same directory as the one you loading.

I think the runtime is failing to find this ither assembly. Try putting the following in FooManager's Application configuration file.

<configuration>
<runtime>
<rt:assemblyBinding xmlns:rt="urn:schemas-microsoft-com:asm.v1">
<rt:probing privatePath="assemblies" />
</rt:assemblyBinding>
</runtime>
</configuration>

Regards

Richardr Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

yes

--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

Richard Blewett said:
obviously "string" should say "strong" there

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

OK, but is that interface declared in another assembly and if so, does it
have a string name or not?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>


All of those types implements shared interfaces which inherits from global
base interface



Richard Blewett said:
Just a guess, do any of the types have a base type that is in another
assembly that is not a system assembly?

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

No,
My code works fine if the assemblies ARE NOT strong name
My code DOES NOT WORK if assemblies ARE strong name.

'DefaultDomain': Loaded
'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols
loaded.

'FooManager': Loaded 'c:\Documents and Settings\tamirk\My
Documents\Visual
Studio Projects\'FooManager\Bin\'FooManager.exe', Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll',
No symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll',
No
symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerInc.dll',
Symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio projects\'FooManager\bin\'FooManagerCon.dll',
Symbols loaded.

'FooManager.exe': Loaded
'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.dll', Symbols loaded.

An unhandled exception of type
'System.Reflection.ReflectionTypeLoadException' occurred in mscorlib.dll

Additional information: One or more of the types in the assembly unable
to
load.


--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "

message
Just to clarify ... is the problem you are seeing:

1) your code doesn't work if the assemblies are strong named

2) your code doesn't work is the assemblies are not strong named

and can you provide the full exception trace that you get from the
error

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog


nntp://news.microsoft.com/microsoft.public.dotnet.languages.csharp/<[email protected]>

Following the code:

Assembly myAssembly = Assembly.LoadFrom(FileName);



foreach (Type myType in myAssembly.GetTypes())

{Do_whatever()}


Works fine until files (transfered to FileName) were not strong named.
Ofter
signing them I'm keeping to get "
One or more of the types in the assembly unable to load." Error

Please advice what I'm missing...



--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]

[microsoft.public.dotnet.languages.csharp]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004



[microsoft.public.dotnet.languages.csharp]
 
Back
Top