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

Binary Compatibility in .NET

In Visual Basic 6.0, there was a setting for DLL's that would prevent a
developer from breaking binary compatibility of a DLL by changing a function
name, parameters, etc. Warnings would appear at compile time.

Is there any such thing in .NET? I can't seem to find the same type of
setting, but I do want a way to prevent developers from changing signatures
of functions.

Thanks,
Dave P.
Nov 21 '05 #1
2 2968
"DaveP" <Da***@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
In Visual Basic 6.0, there was a setting for DLL's that would prevent a
developer from breaking binary compatibility of a DLL by changing a
function name, parameters, etc. Warnings would appear at compile time.

Is there any such thing in .NET?


Guess what? There isn't!
(At least not that I've found, after a /lot/ of digging).

VB.Net will compile just whatever you tell it to, and doesn't give a
d*** that you might have just redefined every single method!

Interfaces go /some/ way to protecting against this; you publish (and
fix) the Interface; other Developers implement them. The down side
is that if you actually need to /change/ the Interface, you either have
to get into Assembly Versioning, or you have to rebuild absolutely
*everything* that implements the Interface against the new one.

The only other way /I've/ found to do this is to write "exerciser" classes
for each "main" class; these access every property, method, constructor,
etc. in the "main" class. If you [accidentally] change a method, this class
no longer compiles. It's not pretty and /far/ from error-free, but it's the
"best" I've come up with thus far.

Someone; *please* tell me this feature is coming back in VS'2005... :-)

HTH,
Phill W.
Nov 21 '05 #2
Thanks Phil. That's pretty much what I expected.

I'm looking at an application that was converted from Centura/SQL Windows to
VB.NET. Unfortunately, this was an "outsourcing" effort, and the goal was to
do a straight port. No enhancements. No rewrites to take advantage of .NET
architecture. Because of this, we're in for some extra work. We've thought
about using interfaces, but now that the code is done, it will take some
reverse engineering. And you're right - to change the interface will take
some work.

The exerciser code would do it, but you've nailed that one too - not pretty,
and lots of work.

That old "binary compatibility" checkbox in VB6 did the trick. I'm with
you. I hope something like that comes back in VS 2005.
"Phill. W" wrote:
"DaveP" <Da***@discussions.microsoft.com> wrote in message
news:06**********************************@microsof t.com...
In Visual Basic 6.0, there was a setting for DLL's that would prevent a
developer from breaking binary compatibility of a DLL by changing a
function name, parameters, etc. Warnings would appear at compile time.

Is there any such thing in .NET?


Guess what? There isn't!
(At least not that I've found, after a /lot/ of digging).

VB.Net will compile just whatever you tell it to, and doesn't give a
d*** that you might have just redefined every single method!

Interfaces go /some/ way to protecting against this; you publish (and
fix) the Interface; other Developers implement them. The down side
is that if you actually need to /change/ the Interface, you either have
to get into Assembly Versioning, or you have to rebuild absolutely
*everything* that implements the Interface against the new one.

The only other way /I've/ found to do this is to write "exerciser" classes
for each "main" class; these access every property, method, constructor,
etc. in the "main" class. If you [accidentally] change a method, this class
no longer compiles. It's not pretty and /far/ from error-free, but it's the
"best" I've come up with thus far.

Someone; *please* tell me this feature is coming back in VS'2005... :-)

HTH,
Phill W.

Nov 21 '05 #3

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

Similar topics

1
by: Marco | last post by:
I'm trying to learn VB. I get the following error when I add a VB project to the one I'm currently working on "Unable to set the version compatible component C:\...\Dir\bin\Project2.dll" where...
6
by: someone | last post by:
Suppose that I have a class in an assembly that is delivered to the user, what can I do to change the class so that it doesn't break the binary compatibility? That is, user application can run...
3
by: Michi Henning | last post by:
Hi, I'm interested in figuring out exactly what kind of change to an assembly is binary compatible. I've browsed the doc a fair bit, but I can't find a comprehensive list of what actually...
3
by: David Laub | last post by:
How do you maintain VB6 like Binary Compatibility in .net?
68
by: vim | last post by:
hello everybody Plz tell the differance between binary file and ascii file............... Thanks in advance vim
4
by: zak | last post by:
we have a suite of products that have a number of shared assemblies. During development and support the shared assemblies code will change . I want to control the versioning, so if the code chnages...
1
by: Simon Woods | last post by:
Hi I have a dll ('dll-X') which runs on top of (dependent upon) several other dlls. My build environment has a folder structure binaries compat-libs
17
by: osama178 | last post by:
Hi, What does it mean for an object to be binary compatible? And why aren't STL objects binary compatible? Any insights, links, resources for further reading are greatly appreciated. Thanks.
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
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.