Why are there two sets of Build and Rebuild options in my ASP.NET project?

231 views Asked by At

It seems as if the success of building my ASP.NET (targeting .NET 3.5) project at least sometimes depends on whether I build it as a project or as a website.

I have these [re]build options beneath the Build menu:

Rebuild Project
Build Project
Rebuild Website
Build Website

Why does the project have dual personalities? What are the advantages/disadvantages or dos/dont's of building either the Project or the Website?

This makes me nervous, because I recently upgraded the Telerik components, and expected some compilation problems to result from that, but had no problems that way. I'm afraid that if I build this "the right way" compilation errors will indeed crop up.

UPDATE

Is the selection of "Build Web site as part of solution" in the project's Build options:

enter image description here

...the reason why there is a pair of [Re]build Website options on the Build menu?

If so, what are the ramifications of deselecting that option? Why should I/should I not select it? Under what circumstances/scenarios is checking/unchecking preferred?

Should the project build option (right-click project, select "Start Options...", then "Build" from the list at left) "Before running startup page" be something other than what is currently selected ("Build Web Site")?

The other options are "No Build" and "Build Page"

1

There are 1 answers

7
Drag and Drop On BEST ANSWER

1. A Project

Projects are used in a solution to logically manage, build, and debug the items that make up your application. The output of a project is usually an executable program (.exe), a dynamic-link library (.dll) file or a module, among others.

Your project can contain Sites and some librairies that are common to your Site.

2. Clean, Build and Rebuild

  • Clean : Delete all compiled files from the bin/obj directory.
  • Build : Compile any assemblies which have changes.
  • ReBuild : Basically Clean + Build.(See Difference below)

Rebuild will clean and build Project after project.
Clean + Build , Will clean All Project frist. Then REbuild them from scratch.

Rebuild can even rebuild some project in paralele.

In some Strange case Clean + build give better result.


There is no reason to be afraid when you have no compilation error.
Dev Selfestem decrease when they gain experience till they are good enought to think they understand what they are doing.


Edit: For the Update question.

- Start Options

It's pretty clear.. When you press F5 Do you want Visual studio to :
a/. Do nothing b/. Compile the current page if there is one open. c/.The WebSite
There is no best choice, it depend on your use for simple project you can use the web site option. for bigger project with a lot of Work in progress page that wont compile use page or no page.

- Build Solution Action

Its basicaly Do you want the web site to be generate when you generate the solution or not ? the question about what is the best to use has no generic answers.

I personnaly use both generate the site web and as a part of solution in my current project

Ps: Do not edit your post with other question create a new one.