473,320 Members | 2,092 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,320 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 3041
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
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.