473,418 Members | 2,368 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,418 software developers and data experts.

Create multiple projects inside a single project

Hello ,
I have two projects A and B
is it possible to import project B in project A?
if not is there any alternative ?

i tried to import project B as a subfolder. but since both the projects are in different namespaces project A doesnt recognise the namespace from Project B
and since each of the projects contain a lot of files it is time consuming to change the namespaces fin each of the files.

any suggestions would be very helpfull
Jul 25 '08 #1
11 3045
Banfa
9,065 Expert Mod 8TB
Without knowing what piece of software you are using your question is going to be impossible to answer.
Jul 25 '08 #2
r035198x
13,262 8TB
You want to do this both in C++ and C#/VB?
Jul 25 '08 #3
sorry i posted my question at the wrong place.. i was asking this question based on visual studio c#
Jul 27 '08 #4
Banfa
9,065 Expert Mod 8TB
OK in Visual Studio (C/C++, C#, VB, SQL Database and all other projects) you can not have projects inside other projects.

You have a Solution (or Workspace in VS 6.0 parlance) you add all you projects to the Solution. If the projects have dependencies on each other then you can set that with project dependencies and VS will then sort out building them in the right order.

To start with if you are using VS 2005 C++ I find it useful to switch on the "Always show solution" option, this is in "Menu->Options..." then in the "Projects and Solutions" tree item. This is not required in VS 2005 C# because it doesn't have that option and it is always on.

To add an existing project to your soltuion

Right click on the Solution in the "Solution Explorer" and then select "Add->Existing Project ..." or select "Add->New Project ..." to add a new project.

Once you have more than 1 project in your solution then right click the project in the solution explorer and select "Project Dependencies ...". In the displayed dialog you can select which prohjects depend on which other projects.

Of course if one or more of you projects are class libraries to be used by the other projects then you will want to add them to the references of the projects that use them. Either right click the project and select "Add References ..." or expanded the project, right click the "References" folder and select "Add References ...". In the box that appears select the "Projects" tabs to add references from other projects that appear in you solution. This will then handle building the project and all its references for debug or release for you as required.
Jul 27 '08 #5
ok thanx a lot for ur reply..actually i earlier had 2 separate projects in a solution and both projects were depending on each other so i was getting a circular dependency.in order to prevent this circular dependendy..i was trying to combine both the projects in one as in eclipse.. but i guess since i cannot combine both the projects in one i need to go back to my earlier thinking thanx a lot for your reply...
Jul 27 '08 #6
Banfa
9,065 Expert Mod 8TB
A circular dependency is indicative of a design flaw and putting the boundaries between you assemblies in the wrong place.

However if you wanted the 2 projects as 1 just include all the source into a single project.
Jul 27 '08 #7
hello,
i have also tried to put the source files from the 2nd project(which are having a different namespace) in the first one but as a sub folder .

but the problem is my main project cannot recognise the source files from this subfolder since they are having a different namespace..

is it possible in visual studio to work with 2 different namespaces in a single project?
Jul 27 '08 #8
Banfa
9,065 Expert Mod 8TB
Yes, after you have include the headers into the file just put

using namespace <YourNameSpace>;
Jul 27 '08 #9
Hello,
thank you..i succeeded so far..now i am able to import the source files from the folder .
However this folder again contains sub folders and these subfolders contain image (.bmp) files and i do not know how to gain access to these source files from the sub folders.
i tried it out with
private <subfolder>.<sourcefile> but unfortunately it doesnt work that way.

would be gratefull for any help provided
Jul 28 '08 #10
sorry..thought i solved the problem but it isnt solved yet.. :(
Jul 28 '08 #11
Hello,
i solved the problem with the namespaces..thanx a lot guys for ur help

regards
sonia
Jul 28 '08 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Harry Whitehouse | last post by:
I'm developing a small class which will be used in a number of distinct C# projects. This small class is undergoing constant change/refinement as I try to employ it in the different projects. ...
1
by: David L?pez | last post by:
Hi, I'm designing a new website and I'm starting to think about code organization. Until now I've worked in projects that had one solution and one project for the whole website. The question is...
1
by: Jody Gelowitz | last post by:
Within ASP.NET, is it possible to use a single .vb file and have it shared (or accessed) between multiple projects without having that file being copied to each project folder? ie....
2
by: mamatha k via .NET 247 | last post by:
(Type your message here) i have 5 projects in a single solution file of the VB.NET.Onlyone project is the startup project and another projects containsthe class files.I want the startup project uses...
10
by: eswanson | last post by:
I have broken up my web site into smaller web site projects. When I look at the precompiled files, it always has the virtual directory in them ie: <preserve resultType="3"...
9
by: TC | last post by:
I need to design a system which represents multiple "projects" in SQL Server. Each project has the same data model, but is independent of all others. My inclination is to use one database to store...
3
by: Claudio Pacciarini | last post by:
Hi everyone, I have a question about .NET code sharing and reuse, and also about application design best practices / guidelines. Currently, we have many different .NET projects in source...
2
by: JB | last post by:
Hi All, I've got a VB.NET 2005 solution composed of 3 projects a Client, a DLL, and a Windows Service. I'd like to create an install package that would install the whole solution (i.e. its 3...
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...
0
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...

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.