473,401 Members | 2,146 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,401 software developers and data experts.

Assembly versioning

Ily
Hi

I have several versions of an assembly in the GAC

My problem is that I want my clients (windows + web clients) to use a
specific version of an assembly

I can get this to work by using the <assemblyBinding> tag in the
app.config

However for web applications, you cant use the <assemblyBinding> as it
is not supported, instead you have to use <assemblies> tag.
This does not work!

I n my web application I have a reference to a GAC dll and this is what
always gets used. However I want to specify a different version using
the web.config, but this doesnt seem to work

Any ideas suggestions anyone?

Nov 19 '05 #1
2 1614
How to redirect an assembly?
There may be a time when you want to use a different assembly version from
the compiled version. You can redirect the assembly to another version at
runtime through publisher policy file such as web.config. Add the following
section in your application configuration file to redirect the data access
components.

<configuration>

...Other section goes here

<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<publisherPolicy apply="no"/>

<dependentAssembly>

<assemblyIdentity name="Your-component-name-in-gac"
publicKeyToken="afe57206630e1asd" culture="neutral" />

<bindingRedirect oldVersion="1.0.1010.12345"
newVersion="1.0.1010.67890"/>

</dependentAssembly>

<dependentAssembly>

<assemblyIdentity name="Your-component-name-in-gac"
publicKeyToken="afe57206630e1asd" culture="neutral" />

<bindingRedirect oldVersion="1.0.1010.12345"
newVersion="1.0.1010.67890"/>

</dependentAssembly>

</assemblyBinding>

</runtime>

</configuration>

The runtime tags goes outside the system.web tags. Also, you must specify
the correct culture and publickeytoken. Otherwise, redirections will not
work. Be sure to use PublisherPolicy tag in web.config.

Thanks,

Prodip

www.aspnet4you.com



"Ily" <il***@igsoftwaresolutions.co.uk> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi

I have several versions of an assembly in the GAC

My problem is that I want my clients (windows + web clients) to use a
specific version of an assembly

I can get this to work by using the <assemblyBinding> tag in the
app.config

However for web applications, you cant use the <assemblyBinding> as it
is not supported, instead you have to use <assemblies> tag.
This does not work!

I n my web application I have a reference to a GAC dll and this is what
always gets used. However I want to specify a different version using
the web.config, but this doesnt seem to work

Any ideas suggestions anyone?

Nov 19 '05 #2
The other option to chaning each config file for each application is to use
a publisher policy, which is a single configuration file (really an assembly
installed into the GAC). This makes it easier (configuration-wise) to have
every app using your component load the one you've specified. Here are some
docs:

http://msdn.microsoft.com/library/de...PolicyFile.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi

I have several versions of an assembly in the GAC

My problem is that I want my clients (windows + web clients) to use a
specific version of an assembly

I can get this to work by using the <assemblyBinding> tag in the
app.config

However for web applications, you cant use the <assemblyBinding> as it
is not supported, instead you have to use <assemblies> tag.
This does not work!
I n my web application I have a reference to a GAC dll and this is
what always gets used. However I want to specify a different version
using the web.config, but this doesnt seem to work

Any ideas suggestions anyone?


Nov 19 '05 #3

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

Similar topics

0
by: Ken Durden | last post by:
I'm working on a client-server application where the client is controlling two devices (aka servers) which both implement the same interface contract. We have a set of about 4 assemblies which...
2
by: Henrik Skak Pedersen | last post by:
Hello, I have a class which is beeing serialized/deserialized using the BinaryFormatter class. That has been working with no problems until I signed all my assemblies. Now I get a...
5
by: mekim | last post by:
Hello....I am trying to System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version.ToString () ; to display the version of the app...but it remains static and therefore does not...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
6
by: Nak | last post by:
Hi there, I was wondering if anyone knew of a way to maintain compatability with assemblies providing the interfaces remains the same? At the moment if I re-compile an assembly without actually...
2
by: jtyner | last post by:
I am trying to get QFE (Quick Fix Engineering) working with an assembly installed in the GAC. I have two books that claim if two different version of the assembly are installed in the GAC -AND-...
6
by: Gavin Sullivan | last post by:
I've been using the date (in YMMDD) format for the build number in the AssemblyVersion attribute. However, it appears that numbers 65534 are invalid!! Bit of a bummer for 2007!!! Is there a...
1
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
6
by: Ben | last post by:
Hi all, First i have to state this is my first entry ever in a forum. So please be forgiving... I am a newbe to dotnet versioning... The Situation is the following: Our application is using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.