user1741137
user1741137

Reputation: 5058

visual studio generates executable from C# but where are the obj files?

I have Visual Studio Express 2010 installed, and have used it for a C# project. Now I am writing a .gitignore file so I can exclude from git the object files that I expect to be generated.

I come from a C++ world mainly.

Trouble is, despite the fact that the target is being generated correctly I cant see any object files (with .obj or .o extension)anywhere in the directory tree of the solution. Could this be caused by the configuration where they are being sent elsewhere?

Upvotes: 0

Views: 64

Answers (2)

Edward Thomson
Edward Thomson

Reputation: 78823

To answer your direct question: C# doesn't have a compile step that produces .obj files like C and C++ do.

However, a .gitignore that's appropriate for C# projects is a well-solved problem. Visual Studio will ask you if you want to add the .gitignore to your new git repository when you create it. If you already have a repository, you can just use the community's .gitignore for Visual Studio which is excellent (and what Visual Studio would install for you.)

Upvotes: 4

XVar
XVar

Reputation: 446

There aren't any .obj files generated during compilation, but there is an obj directory under the project root that's used to store temporary files. This is the directory that should be in your .gitignore file.

Upvotes: 1

Related Questions