Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / March 2005

COM+ app can't locate Assembly in the GAC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Angelos Karantzalis - 24 Feb 2005 12:42 GMT
Hi guys,

I'm writting a COM+ app, which uses dynamic class loading to load up an
instance of a class from an assembly, using:
Activator.CreateInstance(strAssemblyName, strClassName);

I've placed the required assembly in the GAC, but I still get the dreaded
"File or assembly name SqlServerHandler, or one of its dependencies, was not
found" Exception ... :(

Any ideas ?

Cheers,
Angel
O:]
Alexander Shirshov - 24 Feb 2005 13:04 GMT
Angelos,

Can we see what's the value of strAssemblyName? Remember, when an assembly
is in GAC you must provide a fully qualified name.

This doesn't work:

Activator.CreateInstance("System.Data", "System.Data.DataTable");

This does:

Activator.CreateInstance("System.Data, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089, Custom=null", "System.Data.DataTable");
       

HTH,
Alexander

Hello Angelos,

> Hi guys,
>
[quoted text clipped - 11 lines]
> Angel
> O:]
Angelos Karantzalis - 24 Feb 2005 13:17 GMT
Thanks Alex, that's probably it ! If this works, you're my personal hero for
today O:]

Cheers,
Angel
O:]

> Angelos,
>
[quoted text clipped - 30 lines]
> > Angel
> > O:]
Angelos Karantzalis - 24 Feb 2005 13:31 GMT
YES !!! That was indeed it !!! Alex, whenever u come over to Greece, I owe
you one mate !

Cheers,
Angel
O:]

> Angelos,
>
[quoted text clipped - 30 lines]
> > Angel
> > O:]
Michael Starr - 09 Mar 2005 17:57 GMT
I am also having trouble locating an Assembly in the GAC, but I am trying to
instantiate a class in that assembly from my component *directly* (ie, not
using Activatr, just doing a "new").   Do I have to use Activator so that I
can supply the fully-qualified assembly name?    I suppose I could also
register the fully-qualified assembly in a config file somwhere, but what
config file would I use?

> Angelos,
>
[quoted text clipped - 31 lines]
> > Angel
> > O:]
Alexander Shirshov - 11 Mar 2005 03:07 GMT
Michael,

Angelos was trying to instantiate the type unknown at compile time, hence
the use of Activator. You shouldn't need that since you can use new
operator.

What exactly is the problem you are having?

Alexander

>I am also having trouble locating an Assembly in the GAC, but I am trying
>to
[quoted text clipped - 41 lines]
>> > Angel
>> > O:]
universalkid5958@duskmail.com - 22 Mar 2005 16:12 GMT
alexander@omnitalented.com wrote:
> Michael,
> Angelos was trying to instantiate the type unknown at compile time, hence
> the use of Activator. You shouldn't need that since you can use new
> operator.
> What exactly is the problem you are having?
> Alexander

Great!

universalkid5958@duskmail.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.