In Visual Studio 2010, how do I rebuild my site in “release mode”? I can't find “release mode”

StackOverflow https://stackoverflow.com/questions/10358976

Вопрос

I'm getting this error, vb / .net4, although the website is working fine, at the bottom of the page:

YAF Compiled in DEBUG MODE. Recompile in RELEASE MODE to remove this information:

I opened up Visual Studio 2010 right-clicked my solution, looked under the "build" tab, but I cannot find anything about release mode. Could somebody please tell me where I can find this and build my site in release mode? Thanks!

Это было полезно?

Решение

I'm experiencing the same issue with VS 2010 and VS 2011 beta. I suspect a third party tool or plugin may be the culprit and am in the process of looking into this.

For now, just change the compilation switch in the Web.Config to false:

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

UPDATE 1:

I have fixed my VS 2010 issue by uninstalling Telerik JustTrace. I was still experiencing the same issue with VS 2011 beta (on a separate VM to VS 2010) though. So, I tried using a Web Application Project instead of a Website Project and the problem went away.

UPDATE 2:

This is normal for website projects as each page is compiled dynamically:

Why can't you build a website in release mode?

Другие советы

Make sure you have the "Standard" toolbar visible and you should see something like this:

snapshot

Change the "Debug" to "Release" and rebuild your solution.

I have it right in my toolbar.

image1

But you can also change it by using the menu Build => Configuration Manager. Select Release from the Configuration drop down next to your project.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top