473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1845
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: John E. | last post by:
How can I compile two projects with a circular reference while giving them a strong name? There is a project that we have that has two components that reference each other e.g. A<->B thus...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
6
by: Manuel Lopez | last post by:
Hello, I have a Web Project (UserControls.dll) with some user controls that is shared by many asp.net web applicattions. What we do is copy UserControls.dll to all the applications bin...
2
by: Raed Sawalha | last post by:
I have following question: Why Strong Naming? When I need It? Regards
1
by: Tom Stratford | last post by:
Having trouble linking my strong named assemblies together with a vendor provided assembly that is not strong named. Is this possible without giving up my standards for using strong names?
10
by: Chubbly Geezer | last post by:
I have been working on a VB 2005 DLL which has previously been working. I would create the DLL (reporting.dll), install it, run 'gacutil' and 'regasm' and my Access 2000 DB could see it and use...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
8
by: per9000 | last post by:
Dear readers, I have some problems with strong keys. What I want to do is basically this. A - create an application (f.x. strongHello.dll) with a strong key. B - import the functions of this...
6
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.