468,765 Members | 1,493 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Strong name trouble

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 "
Nov 16 '05 #1
8 1684
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/<Of**************@tk2msftngp13.phx.gbl>

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]
Nov 16 '05 #2
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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]

Nov 16 '05 #3
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/<uK**************@TK2MSFTNGP10.phx.gbl>

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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]
Nov 16 '05 #4

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

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
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/<uK**************@TK2MSFTNGP10.phx.gbl>

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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]

Nov 16 '05 #5
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/<ex**************@TK2MSFTNGP12.phx.gbl>
All of those types implements shared interfaces which inherits from global
base interface

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
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/<uK**************@TK2MSFTNGP10.phx.gbl>

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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]
Nov 16 '05 #6
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/<us**************@TK2MSFTNGP15.phx.gbl>

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/<ex**************@TK2MSFTNGP12.phx.gbl>
All of those types implements shared interfaces which inherits from global
base interface

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
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/<uK**************@TK2MSFTNGP10.phx.gbl>

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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]
Nov 16 '05 #7
yes

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

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:es*************@tk2msftngp13.phx.gbl...
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/<us**************@TK2MSFTNGP15.phx.gbl>

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/<ex**************@TK2MSFTNGP12.phx.gbl>
All of those types implements shared interfaces which inherits from global
base interface

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
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/<uK**************@TK2MSFTNGP10.phx.gbl>

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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in
message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]

Nov 16 '05 #8
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/<eC**************@TK2MSFTNGP11.phx.gbl>

yes

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

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:es*************@tk2msftngp13.phx.gbl...
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/<us**************@TK2MSFTNGP15.phx.gbl>

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/<ex**************@TK2MSFTNGP12.phx.gbl>
All of those types implements shared interfaces which inherits from global
base interface

"Richard Blewett [DevelopMentor]" <ri******@develop.com> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
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/<uK**************@TK2MSFTNGP10.phx.gbl>

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\msco rlib.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__b77a5c 561934e089\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__b7 7a5c561934e089\system.xml.dll',
No symbols loaded.

'FooManager.exe': Loaded 'c:\documents and settings\tamirk\my
documents\visual studio
projects\'FooManager\bin\assemblies\'FooManager1.d ll', 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 [DevelopMentor]" <ri******@develop.com> wrote in
message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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/<Of**************@tk2msftngp13.phx.gbl>

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]
Nov 16 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Manuel Lopez | last post: by
2 posts views Thread by Raed Sawalha | last post: by
1 post views Thread by Tom Stratford | last post: by
10 posts views Thread by Chubbly Geezer | last post: by
8 posts views Thread by per9000 | last post: by
6 posts views Thread by raylopez99 | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.