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

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;hxx;hm;inl">
<File RelativePath="..\..\..\src\Foo.h"></File>
<File RelativePath="..\..\..\src\Foo2.h"></File>
<File RelativePath="..\..\..\src\FooFoo.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 2355
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.com

"SpookyET" <no****@hotmail.com> wrote in message
news:op.sm9up4ns1s9n15@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;hxx;hm;inl">
<File RelativePath="..\..\..\src\Foo.h"></File>
<File RelativePath="..\..\..\src\Foo2.h"></File>
<File RelativePath="..\..\..\src\FooFoo.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.microsoft.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.com> 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.com

"SpookyET" <no****@hotmail.com> wrote in message
news:op.sm9y9qi11s9n15@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.microsoft.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.com> 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 <IntermediateOutputPath
..\..\temp\</IntermediateOutputPath> 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.com> 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.com> 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.sm91nnnp1s9n15@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.com> 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****@hypercon.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.sm91nnnp1s9n15@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.com> 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
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...
2
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...
1
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...
4
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...
1
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...
3
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...
1
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...
1
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...
0
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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.