473,834 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is a custom project hierarchy possible for C# projects?

/FooProject
/bin (release)
/doc
/src (only *.cs)
/temp (obj files)
/test (debug)
/build
/Visual Studio 2003
/Visual Studio 2005

I want the solution and project files in the IDE directories, and I want
those project files to have the source code root directory point to /src
and the object files point to /temp. I cannot figure out how to make
Visual Studio do this. It wants the project files in the same directory
as the source code. I'm using Visual C# Express Beta 1. C++ project
files have <Filter>, which looks like a directory in the solution
explorer, that can point to anywhere on disk. I am aware that one can
link files, but this is not enough. I'll have to create the files outside
of visual studio because "Add New File" won't add it to the right
directory. I need to link folders (don't know how) or set the root
directory to /src like I want to. Why are the Visual Studio Team being
despotic about C# projects?

C++ project file:

<Filter Name="My Foo Files" Filter="h;hpp;h xx;hm;inl">
<File RelativePath=". .\..\..\src\Foo .h"></File>
<File RelativePath=". .\..\..\src\Foo 2.h"></File>
<File RelativePath=". .\..\..\src\Foo Foo.h"></File>
<File RelativePath=". .\..\..\src\Bar .h"></File>

You can also have a filter inside this filter for a subdirectory.
</Filter>

In C++ projects, you can also set the obj folder to wherever you want. It
gives full control over how you want to manage the project.
Please help!

Thank you!
Nov 16 '05 #1
7 2384
SpookyET,

Have yout tried starting with a blank project/solution, and then adding
things to that? It's much easier to get the structure you need by doing
that.

Also, I believe you should be able to create directories in your sub
projects like you want, and place your source files in those sub
directories.

As for the obj files, you will have to go into the project file and
modify it yourself to do that. The Express edition should be using the
MSBUILD system in order to compile the project. However, it probably will
require you to go to the master build files on the system (they are in the
..NET install directory) and change those, or replicate the tasks in your
project file.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"SpookyET" <no****@hotmail .com> wrote in message
news:op.sm9up4n s1s9n15@saturn. ..
/FooProject
/bin (release)
/doc
/src (only *.cs)
/temp (obj files)
/test (debug)
/build
/Visual Studio 2003
/Visual Studio 2005

I want the solution and project files in the IDE directories, and I want
those project files to have the source code root directory point to /src
and the object files point to /temp. I cannot figure out how to make
Visual Studio do this. It wants the project files in the same directory
as the source code. I'm using Visual C# Express Beta 1. C++ project
files have <Filter>, which looks like a directory in the solution
explorer, that can point to anywhere on disk. I am aware that one can
link files, but this is not enough. I'll have to create the files outside
of visual studio because "Add New File" won't add it to the right
directory. I need to link folders (don't know how) or set the root
directory to /src like I want to. Why are the Visual Studio Team being
despotic about C# projects?

C++ project file:

<Filter Name="My Foo Files" Filter="h;hpp;h xx;hm;inl">
<File RelativePath=". .\..\..\src\Foo .h"></File>
<File RelativePath=". .\..\..\src\Foo 2.h"></File>
<File RelativePath=". .\..\..\src\Foo Foo.h"></File>
<File RelativePath=". .\..\..\src\Bar .h"></File>

You can also have a filter inside this filter for a subdirectory.
</Filter>

In C++ projects, you can also set the obj folder to wherever you want. It
gives full control over how you want to manage the project.
Please help!

Thank you!

Nov 16 '05 #2
Mr. Paldino,

Starting with a blank solution does not help. Visual Studio wants source
files coupled with .csproj files. The file hierarchy that I want
decouples the project files from the source code and also have them under
different root directories.
This is how VS wants its directories.
/Foo
/Foo/Foo.csproj
/Foo/Foo.cs
/Foo/Bar/
/Foo/Bar/Bar.cs

Obviously, the hierarchy that I want goes against it. MSBUILD does not
care where your files reside on disk. This is a Visual Studio problem.
Also, the schemas that define the MSBuild tags in the .NET directory do
not define the VS project files. MSBuild allows you to have additional
tags that you define like <AppDesigner> that are useful for other tools,
which it ignores. However, those schemas are missing. The URL for the
..csproj "http://schemas.microso ft.com/developer/msbuild/2003" returns 404.

PS: You don't have to modify the master files to change something. You
can overwrite settings in your project files. It works like CSS.

On Mon, 07 Mar 2005 09:50:14 -0500, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c om> wrote:
SpookyET,

Have yout tried starting with a blank project/solution, and then
adding
things to that? It's much easier to get the structure you need by doing
that.

Also, I believe you should be able to create directories in your sub
projects like you want, and place your source files in those sub
directories.

As for the obj files, you will have to go into the project file and
modify it yourself to do that. The Express edition should be using the
MSBUILD system in order to compile the project. However, it probably
will
require you to go to the master build files on the system (they are in
the
.NET install directory) and change those, or replicate the tasks in your
project file.

Hope this helps.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 16 '05 #3
SpookyET,

I understand what you are saying now, and no, you can not decouple the
source and the project file in this manner. The best you could have is the
project file in a directory that is a parent directory of where the source
is.

Also, the VS.NET build system IS MSBUILD for VS.NET 2005, and for the
Express Editions (I believe, since they are locked down versions of VS.NET
2005).

And yes, project files in VS.NET 2005 (and the Express Editions) are
MSBUILD files.

I wouldn't expect the URL for the schema in the file to work either,
since the namespace definition doesn't have to necessarily point to a valid
resource, it just serves as a unique identifier.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"SpookyET" <no****@hotmail .com> wrote in message
news:op.sm9y9qi 11s9n15@saturn. ..
Mr. Paldino,

Starting with a blank solution does not help. Visual Studio wants source
files coupled with .csproj files. The file hierarchy that I want
decouples the project files from the source code and also have them under
different root directories.
This is how VS wants its directories.
/Foo
/Foo/Foo.csproj
/Foo/Foo.cs
/Foo/Bar/
/Foo/Bar/Bar.cs

Obviously, the hierarchy that I want goes against it. MSBUILD does not
care where your files reside on disk. This is a Visual Studio problem.
Also, the schemas that define the MSBuild tags in the .NET directory do
not define the VS project files. MSBuild allows you to have additional
tags that you define like <AppDesigner> that are useful for other tools,
which it ignores. However, those schemas are missing. The URL for the
.csproj "http://schemas.microso ft.com/developer/msbuild/2003" returns 404.

PS: You don't have to modify the master files to change something. You
can overwrite settings in your project files. It works like CSS.

On Mon, 07 Mar 2005 09:50:14 -0500, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c om> wrote:
SpookyET,

Have yout tried starting with a blank project/solution, and then
adding
things to that? It's much easier to get the structure you need by doing
that.

Also, I believe you should be able to create directories in your sub
projects like you want, and place your source files in those sub
directories.

As for the obj files, you will have to go into the project file and
modify it yourself to do that. The Express edition should be using the
MSBUILD system in order to compile the project. However, it probably
will
require you to go to the master build files on the system (they are in
the
.NET install directory) and change those, or replicate the tasks in your
project file.

Hope this helps.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Nov 16 '05 #4
I doubt that these settings are hard-coded. They are either in the
registry or in a settings file. I hope that someone has the answer on how
to change them. Adding <IntermediateOu tputPath
..\..\temp\</IntermediateOut putPath> changes the obj dir to ../../temp, but Visual Studio still creates /obj.

On Mon, 07 Mar 2005 11:18:19 -0500, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c om> wrote:
SpookyET,

I understand what you are saying now, and no, you can not decouple
the
source and the project file in this manner. The best you could have is
the
project file in a directory that is a parent directory of where the
source
is.

Also, the VS.NET build system IS MSBUILD for VS.NET 2005, and for the
Express Editions (I believe, since they are locked down versions of
VS.NET
2005).

And yes, project files in VS.NET 2005 (and the Express Editions) are
MSBUILD files.

I wouldn't expect the URL for the schema in the file to work either,
since the namespace definition doesn't have to necessarily point to a
valid
resource, it just serves as a unique identifier.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 16 '05 #5
By the way, MSBuild is decoupled from Visual Studio. It comes with the
..NET Framework, so there is no locked down version.

On Mon, 07 Mar 2005 11:18:19 -0500, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c om> wrote:
SpookyET,

I understand what you are saying now, and no, you can not decouple
the
source and the project file in this manner. The best you could have is
the
project file in a directory that is a parent directory of where the
source
is.

Also, the VS.NET build system IS MSBUILD for VS.NET 2005, and for the
Express Editions (I believe, since they are locked down versions of
VS.NET
2005).

And yes, project files in VS.NET 2005 (and the Express Editions) are
MSBUILD files.

I wouldn't expect the URL for the schema in the file to work either,
since the namespace definition doesn't have to necessarily point to a
valid
resource, it just serves as a unique identifier.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 16 '05 #6
Spooky,

Can you elaborate on what it is you are trying to accomplish and why? Maybe
if we knew what your ultimate reason was we might be able to suggest a
possible solution. Are you trying to use use to different dev tools at
once? Maybe what you could do is use a source control tool, then the actual
files are stored in a repository and the dev tool no longer matters.

JIM
"SpookyET" <no****@hotmail .com> wrote in message
news:op.sm91nnn p1s9n15@saturn. ..
By the way, MSBuild is decoupled from Visual Studio. It comes with the
.NET Framework, so there is no locked down version.

On Mon, 07 Mar 2005 11:18:19 -0500, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c om> wrote:
SpookyET,

I understand what you are saying now, and no, you can not decouple
the
source and the project file in this manner. The best you could have is
the
project file in a directory that is a parent directory of where the
source
is.

Also, the VS.NET build system IS MSBUILD for VS.NET 2005, and for the
Express Editions (I believe, since they are locked down versions of
VS.NET
2005).

And yes, project files in VS.NET 2005 (and the Express Editions) are
MSBUILD files.

I wouldn't expect the URL for the schema in the file to work either,
since the namespace definition doesn't have to necessarily point to a
valid
resource, it just serves as a unique identifier.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Nov 16 '05 #7
I'm trying to make the project hierarchy more organized that would allow
for easier tagging and branching under Subversion. It would also allow
for many different IDEs to store their project files in a subdir under
/build. I've seen many open source projects having a similar project
hierarchy. For example, VCF (Visual Component Framework), a C++ GUI
library similar to Windows Forms, uses a similar hierarchy. I'm trying to
do the same. As I said earlier, Visual C++ projects do no have this
problem.

On Mon, 07 Mar 2005 12:16:59 -0500, James <no****@hyperco n.net> wrote:
Spooky,

Can you elaborate on what it is you are trying to accomplish and why?
Maybe
if we knew what your ultimate reason was we might be able to suggest a
possible solution. Are you trying to use use to different dev tools at
once? Maybe what you could do is use a source control tool, then the
actual
files are stored in a repository and the dev tool no longer matters.

JIM
"SpookyET" <no****@hotmail .com> wrote in message
news:op.sm91nnn p1s9n15@saturn. ..
By the way, MSBuild is decoupled from Visual Studio. It comes with the
.NET Framework, so there is no locked down version.

On Mon, 07 Mar 2005 11:18:19 -0500, Nicholas Paldino [.NET/C# MVP]
<mv*@spam.guard .caspershouse.c om> wrote:
SpookyET,

I understand what you are saying now, and no, you can not decouple
the
source and the project file in this manner. The best you could have is
the
project file in a directory that is a parent directory of where the
source
is.

Also, the VS.NET build system IS MSBUILD for VS.NET 2005, and for
the
Express Editions (I believe, since they are locked down versions of
VS.NET
2005).

And yes, project files in VS.NET 2005 (and the Express Editions)
are
MSBUILD files.

I wouldn't expect the URL for the schema in the file to work
either,
since the namespace definition doesn't have to necessarily point to a
valid
resource, it just serves as a unique identifier.


--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Nov 16 '05 #8

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

Similar topics

0
1104
by: j | last post by:
I've created a Custom Project Wizard that creates a VB.NET Web Application. I want to add a custom ASPX page and it's ASPX.VB file. I am able to delete the default ASPX.VB file and add my custom one, but I can't get the name replacements to happen. That is, when I bring up the ASPX.VB file in the newly created project, it has the following line: Public Class How can I trigger that replacement to happen?
2
1522
by: 50295 | last post by:
Hi - I program in C++ but I'm not good with VC++ (yet). I will like to create a custom project for which a specific template or wizard does not exist. Because the program is a console application, I started out with the Win32 Console Project template. Having done that, the problem is that my application uses a custom header files and libraries (see code below) that VC++ does not know about. My question therefore is how do I
1
1221
by: Shanthi | last post by:
I am trying to create custom project wizard in C#. It is working fine. But C# expects all the dependant assemblies needed for the Wizard need to be placed under C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\PublicAssemblies. I want to change this path. I want to give custom path for my custom wizard. How can I do that? Can anyone help me in this?
4
1711
by: Bruno van Dooren | last post by:
Hi, i have worked with visual studio for a long time, and would like to have a project template that represents a custom project that is used a lot. (Visual studio .NET 2003) the goal is that if i select 'Add new project', visual studio generates a custom project with the desired files and project settings. i have tried searching MSDN, but i can't find any documentation about this.
1
1014
by: Jordi Vilar | last post by:
Hi, Is there a way to create a new fully customized target for VC++ projects in VS .NET 2003? The idea is to add support for new compilers, so you can compile the same project with different compilers (maybe crosscompilers for other platforms) within the VS IDE. I assume that I need to deveop a VS add-in in order to control the compiler and linker invokations and create the settings dialogs, but
3
1932
by: kamere | last post by:
For your N-tier solutions. Have you architected your UI, Business, and DAL layers into one single project or have you separated them out into separate projects? What would be the benefits of having all 3 layers in one project vs breaking them out to there own separate projects?
1
1895
by: Gene | last post by:
I would like to know if the following is even possible with the visual studio.net Setup and Deployment project. 1. During the deployment after creation of application directory the setup needs to prompt user to select another location to send a data file elsewhere on target machine (with ability to create this directory). 2. After that this secondary location selected/created by the user,
1
1542
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi everybody, I've got a solution that has several dll projects and a website. For the dll projects I've add a configuration 'debug - no code analysis'. Now for the website I can't create custom configurations... The fact that I can't create different configuration for running with code analysis and without code analysis is irritating, but I could live with it.
0
755
by: kennedystephen | last post by:
I've been reading through the MSDN documetation, over creating custom project templates. There was documentation over 2005 and 2008, but no document really saying what parts were new in 2008. Does anybody know, of know of a documentation that lists any differences?
0
9799
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9646
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10550
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9332
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6957
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5627
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4427
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 we have to send another system
3
3083
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.