anvesha
anvesha

Reputation: 119

Where is the obj folder of my visual studio 2010 project

I am new to Visual Studio. I am using VS 2010 and I cannot find the main method of my C# application. After browsing a bit, I found out that it is created during the compilation phase and is located in obj/{Debug/Release} folder. However, I am unable to locate the folder on my system.

My solution explorer and properties window look like this: Solution explorer

And the corresponding directory (path from the properties window in the above picture) doesn't have obj folder. enter image description here

Can somebody help me locate the obj folder? I want to check the flow of my program. Any help is greatly appreciated.

Thanks!

Upvotes: 0

Views: 879

Answers (2)

Mairaj Ahmad
Mairaj Ahmad

Reputation: 14624

You have created an empty WebSite not WebApplication so by default in WebSite there is no bin folder until and unless you explicitly add bin folder or you Add Reference to dll;

In WebSite your main folder for code is App_Code folder where all your .cs files are placed.And in WebApplication all of your code is converted in a dll that is placed in bin folder.

Upvotes: 1

Jon Skeet
Jon Skeet

Reputation: 1503419

I cannot find the main method of my C# application

A web site doesn't have a "main" method. It usually has global initialization hooks, but nothing quite like Main.

It also looks like you've created a "Web Site" project rather than a "Web Application" project - I've never fully understood the difference, but I suspect you may find that a web site project isn't built in quite the same way, so you may never see the output folders you were expecting. In particular, I'm not seeing anything that would correspond to where I'd expect those initialization hooks to be. You may wish to create a new project as an ASP.NET web application instead.

(I'd update to a more modern version of Visual Studio at the same time, if you possibly can. There's a "community" edition of VS2013 or the release candidate for VS2015...)

Upvotes: 3

Related Questions