PC Review


Reply
Thread Tools Rate Thread

How can I load an assembly from the GAC without specifying the version?

 
 
Bernd Sonderkötter
Guest
Posts: n/a
 
      27th Aug 2003
Hi all,

I have a question regarding loading an assembly:

How can I load an assembly from the GAC without specifying the version,
culture and public key? I always have only one single version of this
assembly in the GAC at a given time.

Thanks,
Bernd


 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      27th Aug 2003
Bernd,

>How can I load an assembly from the GAC without specifying the version,
>culture and public key? I always have only one single version of this
>assembly in the GAC at a given time.


I don't think you should ignore versioning even if you know only a
single version will be installed. You can't know for sure that the
installed version is compatible with the one you've tested against.

To answer your question, check out Assembly.LoadWithPartialName(). But
be sure to also read the following page to learn why this is a bad
idea.

http://blogs.gotdotnet.com/suzcook/P...3-56c29a59b22d



Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Ken Microsoft Dot NET Framework 0 13th Jun 2007 05:02 PM
Could not load file or assembly 'System.Transactions, Version=2.0.0.0, Ken Microsoft VB .NET 0 5th May 2007 01:30 AM
how to load a 1.1 version assembly into 2.0 environment? admin@5inet.net Microsoft Dot NET Framework 3 25th Oct 2006 12:32 PM
Assembly.Load() with strong name but no version! edge Microsoft Dot NET Framework 2 13th Dec 2004 06:12 PM
Assembly.Load() with strong name but no version! edge Microsoft C# .NET 3 11th Dec 2004 12:20 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:00 PM.