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

VB.NET Assembly Compatability

Nak
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.
Nov 21 '05 #1
6 1659
If you are sure that you are not breaking compability (VS.NET, on the
contrary to VB6, does not offer yet a tool to verify this), you need to keep
the value of the AssemblyVersion attribute of the AssemblyInfo.vb file,
because by default it is changed on each build:

<Assembly: AssemblyVersion("1.0.*")>

So, change it to, say:

<Assembly: AssemblyVersion("1.0.0.0")>

and don´t change it until you break compatibility.

You should also add another attribute that is not added by default:

<Assembly: AssemblyFileVersion("1.0.0.5")>

which is the classic Win32 file version (shown in Windows Explorer), not the
assembly version (shown in GAC viewer), and you change this on each build,
to be able to distinguish each build now that the assembly version is the
same (if ommited, the assembly file version is set to the assembly version).

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Nak" <a@a.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.

Nov 21 '05 #2
Nak
Hi Carlos,

Excellent! Cheers.

Nick.

"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:O$**************@TK2MSFTNGP14.phx.gbl...
If you are sure that you are not breaking compability (VS.NET, on the
contrary to VB6, does not offer yet a tool to verify this), you need to
keep the value of the AssemblyVersion attribute of the AssemblyInfo.vb
file, because by default it is changed on each build:

<Assembly: AssemblyVersion("1.0.*")>

So, change it to, say:

<Assembly: AssemblyVersion("1.0.0.0")>

and don´t change it until you break compatibility.

You should also add another attribute that is not added by default:

<Assembly: AssemblyFileVersion("1.0.0.5")>

which is the classic Win32 file version (shown in Windows Explorer), not
the assembly version (shown in GAC viewer), and you change this on each
build, to be able to distinguish each build now that the assembly version
is the same (if ommited, the assembly file version is set to the assembly
version).

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Nak" <a@a.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.


Nov 21 '05 #3
Nak
Hi there,

Thinking more about this solution it doesn't seem as nice as I had first
thought. I would like to keep automatic versioning as I've relied on it for
quite a while now, and actually remembering to change the version number
when an interface changes will bound to be too risky for me. So I hunted
around some more and found that the app config file can solve this issue,

<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding
xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mysharedassembly"
publicKeyToken="mysharedassemblykeytoken" />
<bindingRedirect oldVersion="1.0.0.0-1.0.99999.99999"
newVersion="currentversion" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

So now I can keep compatability while retaining automatic versioning.

Nick.

"Nak" <a@a.com> wrote in message
news:O%****************@TK2MSFTNGP11.phx.gbl...
Hi Carlos,

Excellent! Cheers.

Nick.

"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:O$**************@TK2MSFTNGP14.phx.gbl...
If you are sure that you are not breaking compability (VS.NET, on the
contrary to VB6, does not offer yet a tool to verify this), you need to
keep the value of the AssemblyVersion attribute of the AssemblyInfo.vb
file, because by default it is changed on each build:

<Assembly: AssemblyVersion("1.0.*")>

So, change it to, say:

<Assembly: AssemblyVersion("1.0.0.0")>

and don´t change it until you break compatibility.

You should also add another attribute that is not added by default:

<Assembly: AssemblyFileVersion("1.0.0.5")>

which is the classic Win32 file version (shown in Windows Explorer), not
the assembly version (shown in GAC viewer), and you change this on each
build, to be able to distinguish each build now that the assembly version
is the same (if ommited, the assembly file version is set to the assembly
version).

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Nak" <a@a.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP09.phx.gbl...
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.



Nov 21 '05 #4
If you have the control over the apps that call your assembly that approach
will work too, but there are scenarios where you don´t know or control all
the applications that call your assembly, so you would use the other
approach in those scenarios...

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Nak" <a@a.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi there,

Thinking more about this solution it doesn't seem as nice as I had
first thought. I would like to keep automatic versioning as I've relied
on it for quite a while now, and actually remembering to change the
version number when an interface changes will bound to be too risky for
me. So I hunted around some more and found that the app config file can
solve this issue,

<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding
xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mysharedassembly"
publicKeyToken="mysharedassemblykeytoken" />
<bindingRedirect oldVersion="1.0.0.0-1.0.99999.99999"
newVersion="currentversion" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

So now I can keep compatability while retaining automatic versioning.

Nick.


Nov 21 '05 #5
Nak
Hi there Carlos,
If you have the control over the apps that call your assembly that
approach will work too, but there are scenarios where you don´t know or
control all the applications that call your assembly, so you would use the
other approach in those scenarios...
ACK and appreciated. But I'm just using it to control plugins to help
prevent them from having to be recompiled every time my application
framework changes.

Probably in hindsight I would have drastically modified the way my
Framework is structured but unfortunately at the moment I need to assure
that the plug-ins will at least attempt to run. Maybe I could also check
what version they are compiled against and give the user the ability to only
use 100% upto-date plug-ins but maybe this gives a little too much control!

By the way, it's good to see you in this group, I remember using your
MZ-Tools for VB6, valuable asset that was!

Nick.

"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:Of**************@tk2msftngp13.phx.gbl...

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"Nak" <a@a.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi there,

Thinking more about this solution it doesn't seem as nice as I had
first thought. I would like to keep automatic versioning as I've relied
on it for quite a while now, and actually remembering to change the
version number when an interface changes will bound to be too risky for
me. So I hunted around some more and found that the app config file can
solve this issue,

<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding
xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="mysharedassembly"
publicKeyToken="mysharedassemblykeytoken" />
<bindingRedirect oldVersion="1.0.0.0-1.0.99999.99999"
newVersion="currentversion" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

So now I can keep compatability while retaining automatic versioning.

Nick.

Nov 21 '05 #6
"Nak" <a@a.com> escribió en el mensaje
news:%2****************@TK2MSFTNGP10.phx.gbl...
By the way, it's good to see you in this group, I remember using your
MZ-Tools for VB6, valuable asset that was!


I have spent the last 3 years or so in forums and newsgroups about .NET
add-ins, and I became MVP for that, I will try to spend more time in general
..NET groups. Now you have MZ-Tools 4.0 for VS.NET, no longer free but quite
cheap, if you want to take a look. I remember that I had the same problem
that you because now the mztools4.dll assembly exposes its API to plug-ins
to provide operation extensions (yeah, plug-ins for a plug-in of VS.NET !)
and since mztools4.dll is not an exe, it can not use a config file, so I
have to use the approach that I suggested, keeping the AsssemblyVersion
constant while maintaining backwards compatibility.

--

Carlos J. Quintero

MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com


Nov 21 '05 #7

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...
4
by: WStoreyII | last post by:
I know that the main two browsers are ie and netscape. However, how do i know if browsers like aol and other abstract browser put out by isps like sbc and earthlink are compatable with asp.net. I...
0
by: SenthilVel | last post by:
hi I have my application built with Dotnet Framework 1.1 and now i can see most of clients having both the versions 2.0 and 1.1 in their systems, i get an issue when i run my 1.1 application . ...
1
by: abbu | last post by:
Hi, Can anybody explain the difference between standard and compatability mode compilatin in C++? Regards, abbu
0
by: David | last post by:
I am trying to migrate a .net 1.1 Web Application to a 2.0 Web Application. I am experiencing issues when putting a strongly typed dataset into session, and then navigation to a page where...
3
by: Rich | last post by:
I put together a simple test class libary (VB2005) with one class and one function that takes an integer argument and adds 10 the argument and returns that number. Then I created a simple VB2005...
1
by: internet.system.error | last post by:
Hello, I write the casual Java code, and to make life easier at work I´ve decided to write a C# application that reads two excel files and does the usual number crunching and spits out a new file....
1
by: jsmall | last post by:
Hi, We currently have a fairly old product, which was originally only compatible with SQL 2000. When we upgraded our server to SQL 2005, the client product gave us a "This product is not...
10
by: Bobby | last post by:
Hi, The organisation I work for is on the verge of buying Microsoft Office 2007 Pro Plus OLP NL. We currently use Office Pro 2003. Our business system is written in Access 2003 with a SQL Server...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.