473,379 Members | 1,185 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,379 software developers and data experts.

Assembly.Load() with strong name but no version!

Is there any way to Assembly.Load() dynamically the DLLs of my project, with
their strong names, but without the need to specify a version? I just want
the public/private key to exist as a measure of safety for their
authenticity. I don't want to narrow down the valid DLLs to only those that
share the same version.

Because if later i decide to upgrade a DLL, I'll have to recompile and send
to the customer the WHOLE project, and not just the newer DLL, because its
version will differ from the others...

Thanks!


Nov 16 '05 #1
3 3353
If you know the path to the assembly you can use this...

Assembly.Load( AssemblyName.GetAssemblyName(assemblyPath));

Assembly.Load requires that the assembly be located in a folder where the
runtime can automatically resolve the assembly (e.g. in the same folder as
the executable).

"edge" <a@edge.gr> wrote in message news:cp**********@usenet.otenet.gr...
Is there any way to Assembly.Load() dynamically the DLLs of my project,
with
their strong names, but without the need to specify a version? I just want
the public/private key to exist as a measure of safety for their
authenticity. I don't want to narrow down the valid DLLs to only those
that
share the same version.

Because if later i decide to upgrade a DLL, I'll have to recompile and
send
to the customer the WHOLE project, and not just the newer DLL, because its
version will differ from the others...

Thanks!

Nov 16 '05 #2
Of couse you don't need to deploy the whole project, you could send the new assembly along with a publisher policy that peformed a version redirection

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

If you know the path to the assembly you can use this...

Assembly.Load( AssemblyName.GetAssemblyName(assemblyPath));

Assembly.Load requires that the assembly be located in a folder where the
runtime can automatically resolve the assembly (e.g. in the same folder as
the executable).

"edge" <a@edge.gr> wrote in message news:cp**********@usenet.otenet.gr...
Is there any way to Assembly.Load() dynamically the DLLs of my project,
with
their strong names, but without the need to specify a version? I just want
the public/private key to exist as a measure of safety for their
authenticity. I don't want to narrow down the valid DLLs to only those
that
share the same version.

Because if later i decide to upgrade a DLL, I'll have to recompile and
send
to the customer the WHOLE project, and not just the newer DLL, because its
version will differ from the others...

Thanks!


Nov 16 '05 #3
True, but publisher policy files must be installed in the GAC. If the
assembly is located local to the application then the version binding
redirect can be done locally in the application configuration file. If
dynamically loaded then neither is needed though the option is still there
if needed.

"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
Of couse you don't need to deploy the whole project, you could send the
new assembly along with a publisher policy that peformed a version
redirection

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

If you know the path to the assembly you can use this...

Assembly.Load( AssemblyName.GetAssemblyName(assemblyPath));

Assembly.Load requires that the assembly be located in a folder where the
runtime can automatically resolve the assembly (e.g. in the same folder as
the executable).

"edge" <a@edge.gr> wrote in message news:cp**********@usenet.otenet.gr...
Is there any way to Assembly.Load() dynamically the DLLs of my project,
with
their strong names, but without the need to specify a version? I just
want
the public/private key to exist as a measure of safety for their
authenticity. I don't want to narrow down the valid DLLs to only those
that
share the same version.

Because if later i decide to upgrade a DLL, I'll have to recompile and
send
to the customer the WHOLE project, and not just the newer DLL, because
its
version will differ from the others...

Thanks!

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Arnaud Debaene | last post by:
Hello group. I have an app which can load "plugins" assemblies that are described in the registry (each registry entry gives the full path to the plugin ..dll file). The plugins may be anywhere...
1
by: Zeng | last post by:
I randomly got this error: "System.IO.FileLoadException: The located assembly's manifest definition with name 'ClientToolLib' does not match the assembly reference." I noticed that in the...
3
by: Atul Godbole | last post by:
Suppose an assembly "Main" is using class "A" from another Assembly "Dep" as follows : A a = new A(); a.MethodOne(); At what time is the call to MethodOne linked to the actual MSIL (method...
4
by: Mark | last post by:
I wan't to be able to deserialize a class from an assembly that is not in the application domain. To do that I must have the Type from the Assembly. How do you get a Type from an assembly that is...
1
by: Greg Patrick | last post by:
My problem: I load an some assemblies (strong named) from a byte array using Assembly.Load(byte). They load fine. But one one of them is actually accessed, it's referenced assemblies can't be...
3
by: Web Team | last post by:
Hi All, I recently moved our assembly which stores our 'common' code into the GAC. I then moved all copies of this assembly out of the /bin folders, restarted IIS. I get the error below. This...
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...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
6
by: Andrus | last post by:
VCSE 2005 .NET 2 WinForms I created assembly at runtime and added mydll.dll reference to it. mydll.dll is in applicatino startup directory. When I change mydl.dll to never version, this assembly...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.