473,503 Members | 1,662 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to share projects between solutions

I have an application that I am developing that is a front end for a SQL
database. We will also be developing a subset of the UI that will work as a
(mainly) standalone client that will make a connection to the database, copy
the relevant data to a local file, and disconnect from the database. The
users will then be able to make modifications using the UI, and when a
connection is available they can connect and upload their changes. Since I
want the majority of the UI to be the same for both clients, I have divided
up my solution for the main (always connected) client to seperate the
sections that will be used in both applications from those that will be
unique to one or the other. My question is: what are the mechanics of using
a project in multiple solutions, particularly in that some of the items that
the shared project must reference will be different between the 2 solutions.
(E.G. there will be a DataConnection reference which in the connected client
will need to connect to the database and in the disconnected client will
need to "connect" to the local file.)

TIA
Ron L
Nov 21 '05 #1
3 3291
Instead of sharing whole projects, I would share code files. That is, I
would create 2 projects but using the same code files from a shared folder.
You can use shared code files using Add Existing Item menu of a project, and
in the dialog drop down the Open button (with an arrow) and use Link File
instead of Open.

Also, you may want to use conditional compilation is some file or method
must have a different behavior depending on the project. Projects allow you
to define compilation constants (Project properties, Configuration
Properties, Build node) and you can use them in your code:

#If PROJECT_A Then
' Connect to remote database
....
#Else
' Connect to local database
....
#End If

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Ron L" <ro**@bogus.Address.com> escribió en el mensaje
news:u3**************@TK2MSFTNGP10.phx.gbl...
I have an application that I am developing that is a front end for a SQL
database. We will also be developing a subset of the UI that will work as
a (mainly) standalone client that will make a connection to the database,
copy the relevant data to a local file, and disconnect from the database.
The users will then be able to make modifications using the UI, and when a
connection is available they can connect and upload their changes. Since I
want the majority of the UI to be the same for both clients, I have divided
up my solution for the main (always connected) client to seperate the
sections that will be used in both applications from those that will be
unique to one or the other. My question is: what are the mechanics of
using a project in multiple solutions, particularly in that some of the
items that the shared project must reference will be different between the
2 solutions. (E.G. there will be a DataConnection reference which in the
connected client will need to connect to the database and in the
disconnected client will need to "connect" to the local file.)

TIA
Ron L

Nov 21 '05 #2
Carlos
Thank you for the response. I had been wondering if seperate projects
with common code files was the way to do it, or if there was a better way.

Ron L

"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:uO**************@TK2MSFTNGP14.phx.gbl...
Instead of sharing whole projects, I would share code files. That is, I
would create 2 projects but using the same code files from a shared
folder. You can use shared code files using Add Existing Item menu of a
project, and in the dialog drop down the Open button (with an arrow) and
use Link File instead of Open.

Also, you may want to use conditional compilation is some file or method
must have a different behavior depending on the project. Projects allow
you to define compilation constants (Project properties, Configuration
Properties, Build node) and you can use them in your code:

#If PROJECT_A Then
' Connect to remote database
...
#Else
' Connect to local database
...
#End If

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Ron L" <ro**@bogus.Address.com> escribió en el mensaje
news:u3**************@TK2MSFTNGP10.phx.gbl...
I have an application that I am developing that is a front end for a SQL
database. We will also be developing a subset of the UI that will work as
a (mainly) standalone client that will make a connection to the database,
copy the relevant data to a local file, and disconnect from the database.
The users will then be able to make modifications using the UI, and when a
connection is available they can connect and upload their changes. Since
I want the majority of the UI to be the same for both clients, I have
divided up my solution for the main (always connected) client to seperate
the sections that will be used in both applications from those that will
be unique to one or the other. My question is: what are the mechanics of
using a project in multiple solutions, particularly in that some of the
items that the shared project must reference will be different between the
2 solutions. (E.G. there will be a DataConnection reference which in the
connected client will need to connect to the database and in the
disconnected client will need to "connect" to the local file.)

TIA
Ron L


Nov 21 '05 #3
Hi Ron,

Notice that while you can create different configurations for a project,
such as ProjectA_Debug, ProjectA_Release, ProjectB_Debug,ProjectB_Release,
the assembly name is the same for all of them (it is not configurable per
configuration, only the output folder), so if you want 2 assemblies, you
need 2 projects...

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Ron L" <ro**@bogus.Address.com> escribió en el mensaje
news:OO*************@TK2MSFTNGP10.phx.gbl...
Carlos
Thank you for the response. I had been wondering if seperate projects
with common code files was the way to do it, or if there was a better way.

Ron L


Nov 21 '05 #4

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

Similar topics

3
8377
by: AARON PECORARO | last post by:
I need to split apart my web application into multiple projects to allow it to be distributed in parts, but all of the projects need to work together (ie. they need to share session information)....
1
3369
by: Macca | last post by:
Hi, I have a C# Solution/Application that contain 4 projects. Each of these projects needs at some time to access the same database. I would like to know how to share a single connection...
3
1941
by: epigram | last post by:
I've been creating some toy ASP.NET apps in an effort to understand the technology. I've something odd with regards to project/solution creation. If you create a new asp.net application, it...
3
1819
by: sameer | last post by:
Hi , Visual Studio 2003, VB.NEt my VB.Net solution has 10 project files, 1exe and 10 dlls in it and when i load up the solutions it takes for ever to load up and is pretty slow. Is there any...
1
1718
by: Rommellion | last post by:
We have 5 to 6 projects .net running on production, in which each one has its own virtual direstory, however we need to add up two more and link them all together so they can share same single...
15
5784
by: Neo | last post by:
Hello All, I found that ASP.net website only accepts code withing site directory. This creates big hurdle in shairng code. How to share code between two websites, like the way share between two...
10
2084
by: =?Utf-8?B?SmFrb2IgTGl0aG5lcg==?= | last post by:
We have a complex VS solution with several web projects. The reason is the applications share a lot of business logic that change often and we want to observe the implications of all changes. ...
3
2139
by: Meteor | last post by:
I have a vs2005 solution containing about 5 projects, three of which have their own .settings files. When I deploy the application, I want all the settings to be in one place - configurable -...
4
2654
by: Looch | last post by:
All, I created a class in a windows application and I'd like to be able to pass an instance of that class as a method parameter to a web service. The class contains 100 variables. I tried adding...
0
7083
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...
1
6988
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
5578
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,...
1
5011
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...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3166
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...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
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 ...
0
379
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...

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.