Re: Strong name trouble

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Richard Blewett [DevelopMentor] (richardb_at_develop.com)
Date: 10/04/04


To: microsoft.public.dotnet.languages.csharp
Date: Mon, 04 Oct 2004 00:13:20 -0700

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/>

 yes
 
 --
 Tamir Khason
 You want dot.NET? Just ask:
 "Please, www.dotnet.us "
 
 "Richard Blewett [DevelopMentor]" <richardb@develop.com> wrote in message
 news:esk1QfZqEHA.556@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/>
>
> 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/>
>
>
> All of those types implements shared interfaces which inherits from global
> base interface
>
>
>
> "Richard Blewett [DevelopMentor]" <richardb@develop.com> wrote in message
> news:ut5HPzYqEHA.1644@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/>
> >
> > 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 [DevelopMentor]" <richardb@develop.com> wrote in
> > message
> > news:%23aeBaVYqEHA.1960@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/>
> > >
> > > 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]



Relevant Pages

  • Re: Not sure what to title this?
    ... Joe wrote: ... On the "interfaces" tab what ... Best regards, ...
    (microsoft.public.windows.server.dns)
  • Re: Modules & positive surprises
    ... regards to what they can actually do -- too be perfectly honest, ... very rare that I become impressed by the _interfaces_ to the modules. ... and unfortunately that's not how module developers do it. ... Yesterday I found another module which I fell in love with: Python ...
    (comp.lang.python)
  • Modules & positive surprises
    ... regards to what they can actually do -- too be perfectly honest, ... very rare that I become impressed by the _interfaces_ to the modules. ... and unfortunately that's not how module developers do it. ...
    (comp.lang.python)
  • Re: C# Vs VB.NET
    ... classes, interfaces and so on. ... Regards, ... Frank Eller ... Prev by Date: ...
    (microsoft.public.dotnet.framework.clr)
  • RE: MESSAGE problem
    ... It seems to me the interfaces to ... MESSAGE should be provided by the MESSAGE documentation, ... >Incoming mail is certified Virus Free. ... Outgoing mail is certified Virus Free. ...
    (comp.os.vms)