473,770 Members | 1,991 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 2380
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
1521
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
1220
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
1707
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
1013
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
1930
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
1891
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
1541
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
752
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
9618
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
9454
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
10101
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6710
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
5354
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...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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

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.