Click here to Skip to main content
10,500,000 members (68,167 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Visual-Studio VS2010
Hello, When i using VS to create a c# Project, in the Project file, it always create some folders and files,(Before Debug)

Folders:
bin
obj
Properties


Files:
.cs files
A Visual C# Project file has the same name with the Project.


I would like to know:
1, What is this "obj" folder? There is a x86 folder in it and a debug inside x86 folder.

2,What is Visual C# Project file mean (has the same name with the Project).

Thanks, any links will be appreciated,

ChelseaJCole
Posted 27-Dec-12 12:40pm
Comments
Sergey Alexandrovich Kryukov at 27-Dec-12 17:53pm
   
No, it's not "before Debug". The directories like "Debug" depend on your project settings. This is the parent directory for output directory. This is something you configure yourself. Unlike "obj".
—SA
Sergey Alexandrovich Kryukov at 27-Dec-12 18:29pm
   
I just answered both of your questions. They are quite naive, but both are accurately formulated and probably show your intent to get the essence of things. I voted 4. (And this is a very, rarely high vote; look around: the majority of questions these days get a vote of 1, for good reasons.)
—SA
Chelseajcole at 28-Dec-12 10:47am
   
Thanks
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

This directory is the only directory use by the build system to place all the intermediate files used for the build. You can remove this directory at any time, or try to do it. As the files are all intermediate, you don't risk to loose anything. However, as the build is usually incremental, the time for build may increase, as some work will be done again. Importantly, deleting of this directory is one of the ways to completely clean-up the project.

Now, as the files are intermediate, you don't need to look into this directory. Well, almost. Sometimes, this is useful to learn how some things work. One example is this: WPF project generates some common code and compiles with that generated code, so it is placed in the "obj" sub-directory. That includes the Main method and some other stuff. In a number of cases, you need to make this code custom by just writing it. Instead of reading the documentation, you can simply find the generated code in "obj" directory and see how it should be written. Got the hint?

Now, the problem about the project file is much more complex; I hardly could answer it in one short post. This is a really advanced standard of project files used to work through MSBuild.exe.
Not only you can use it with Visual Studio, but you can use it on many systems (Linux, Mac OS X) with Mono, you can develop your own build steps ("Tasks") through development of specially designed build assemblies, integrate any custom tools, 3rd-party or your own compilers for different languages (not only those targeting .NET) and a lot more.

Most importantly, you can build any project or solution without Visual Studio. MSBuild, as well as C# and VB.NET compilers comes for free with the (redistributable) .NET Framework. You just need to execute MSBuild <parameters>....

Please see:
http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx[^],
http://msdn.microsoft.com/en-us/library/vstudio/ms164311.aspx[^].

First branch of documentation describes programming interface and the rules for the development of the project file, the second one — describes the command-line parameters of just the the MSBuild.exe application. Learning the first one may need considerable effort, but if you need custom of just advanced product build, you can get amazingly neat and highly automated results.

[EDIT]

Please also take a look at my past answer; some part of it is related to the topic: How to use cs class in a VB web application[^].

Good luck,
—SA
  Permalink  
v5
Comments
Chelseajcole at 28-Dec-12 10:38am
   
Thank you so mcuh for the answer!!
Sergey Alexandrovich Kryukov at 28-Dec-12 12:33pm
   
You are welcome.
Good luck, call again,
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This should help,

http://bit.ly/YRlb8K[^]
  Permalink  
Comments
Chelseajcole at 28-Dec-12 10:48am
   
Thanks, that help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.150428.2 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100