Sharing source code between Vs2003 and Vs2005 IDE

C

Carlo \(MCP only\)

Hi to all

I'm askyng you a suggestion about the best way to share the same source code
between VS2003 and VS2005.
The project I'm developing is a controls and components library, and the
Solution.sln includes a standard WindowsForms application for testing
pourposes.
What I need is an efficient and reliable way to edit and test the DLL
assembly in both environments, since the library will be distributed for
Framework 1.1 and 2.0.

I've tried to set-up two different solutions (one for VS2003 and the other
for VS2005) working on the same source files, but I got some errors. For
example, I think they cannot share the same .\Debug folder. Furthermore, I
believe that the .resx files and Windows.System.Forms are not mutually
compatibles.

Have you experimented/solved the same situation?

Thank you very much.

Carlo
 
F

Frank Hileman

Hello Carlo,

The and projects are not compatible, nor some of the generated code in
InitializeComponents. Here is what we do: we have VS 2003 and VS 2005
directories dedicated to development. We do not share the physical files
between the solutions, instead they are shared via the source-code control
system. So after we check in changes in one branch or the other, if the file
is shared, the other branch must be updated via get latest version. In the
source code control, most files are shared between the two projects.

All the files which cannot be shared are branched permanently in the source
code control system. However, the windows forms code generated in VS 2003
can be used in VS 2005. This means all your UI work must be done in the VS
2003 directory tree, which works if you have no VS 2005 specific controls.
VS 2003 seems more stable for UI work anyway.

Other work can be done in either version, as long as you use conditional
compilation (#if) to protect the VS 2003 branch from new code for the .net
framework 2.0.

If you have to permanently branch your UI classes, it is best to reduce them
to only contain a UI and move all logic into classes that can be shared
between the two versions.

That is my best advice.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio graphics editor
 
C

Carlo \(MCP only\)

Hello Frank
I've carefully read your suggestions. It is very intelligent.
At the moment, we are developing in 1.1 IDE for a Fw 1.1 version of the
product, and we plan to migrate to a full Fw 2.0 version in the next months.
For this first version, we do not use any of the Fw 2.0 features, so the
code should remain mutually compatible, exept for the auto-generated
fragments.
Some days ago, we tested a IDE 2.0 migration, but when we opened back the
source code in IDE 1.1 we had a lot of problems with *.resx files. So, at
the moment we excluded a bi-directional editing.
However., I will check your solution in a very near future...
Thank you again Frank,
Carlo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top