473,752 Members | 9,016 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 <assemblyBindin g> tag in the
app.config

However for web applications, you cant use the <assemblyBindin g> 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 1628
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.

<configuratio n>

...Other section goes here

<runtime>

<assemblyBindin g xmlns="urn:sche mas-microsoft-com:asm.v1">

<publisherPolic y apply="no"/>

<dependentAssem bly>

<assemblyIdenti ty name="Your-component-name-in-gac"
publicKeyToken= "afe57206630e1a sd" culture="neutra l" />

<bindingRedirec t oldVersion="1.0 .1010.12345"
newVersion="1.0 .1010.67890"/>

</dependentAssemb ly>

<dependentAssem bly>

<assemblyIdenti ty name="Your-component-name-in-gac"
publicKeyToken= "afe57206630e1a sd" culture="neutra l" />

<bindingRedirec t oldVersion="1.0 .1010.12345"
newVersion="1.0 .1010.67890"/>

</dependentAssemb ly>

</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***@igsoftwa resolutions.co. uk> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.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 <assemblyBindin g> tag in the
app.config

However for web applications, you cant use the <assemblyBindin g> 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 <assemblyBindin g> tag in the
app.config

However for web applications, you cant use the <assemblyBindin g> 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
1694
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 specify the interfaces and the data types which flow through the interfaces. Initially, we thought this would be enough for the client to talk with the server. In general it is, but when an exception is generated by the server it fails to...
2
2730
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 SerializationException when I try to Deserialize the class which has been serialized before the signing. So what is best practice in my situation? Do I have to convert all my saved classes or do I write a SerializationBinder to handle it runtime?
5
3605
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 increment...it's AssemblyInfo.vb looks like this
10
3479
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 somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
11
1922
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 one I select? Thanks
6
1673
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 changing an interface it breaks compatability, forcing all of my consuming assemblies to need recompiling. I know this could be done with VB6, what about .NET? Nick.
2
2181
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- they vary only by revision number, then the default policy is to load the higher number version. I am not able to reproduce this behavior in practice. My test case is simple. I wrote a class with AssemblyVersion 1.0.0.1. Installed into GAC. ...
6
3690
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 reason for this? 65535 would make sense!? Is there a work around, patch, etc?? Regards
1
2259
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 I have pasted the part I'm interested in below. My company doesn't use versioning or the gac and I'd like to. We're on vs.net 2005 & .net 2., is this still true or has it changed since then? thanks That article is not entirely accurate. ...
6
3546
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 an external managed .dll. Whos version is changing from time to time. The interface is not changing at all. As i have included this dll in my
0
9616
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9423
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9371
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9279
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6830
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4726
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3340
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2819
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2237
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.