Reza Nabati
Reza Nabati

Reputation: 163

Why the Web site project does not have release mode in config?

I'm currently working in the web site project.I want to build project in release mode, that unfortunately saw visual studio does not have release mode for build and only have debug mode.

in web application project we see two option in build debug and release.

I want to know why web site project have debug mode in build.I was read about debug and release mode building that release mode have optimize code and have less overhead.

Upvotes: 4

Views: 2342

Answers (2)

Coderx07
Coderx07

Reputation: 198

In web site projects pages are compiled dynamically upon first request. It will compile without debugging symbols unless you specify otherwise in the config file.

You cant change it with configuration manager neither you see it in its options.

In your web config file find these options

<system.web>
 ...
<compilation debug="true">
...
</compilation>
</system.web>

Set true to false then it will publish in release mode. Hope it helps

Upvotes: 1

Pranay Rana
Pranay Rana

Reputation: 176896

You need to set release meod by right clicking solution > property> in dialog change it release mode or direclty from the rop of vidual studio set it for the release , see below image marked with red

enter image description here

Upvotes: 1

Related Questions