1

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!

Jason Weber
  • 5,653
  • 6
  • 40
  • 73

3 Answers3

3

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?

Community
  • 1
  • 1
IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
  • Hey Irish .... I'm not sure if I have any plugins, but my web.config was already set as you suggested: – Jason Weber Apr 27 '12 at 23:53
  • Irish, I thank you for your persistence. Whether I open it up as a web project or a website, the release option still isn't there. Maybe it's because yetanotherforum comes as a compiled site, without the source code? But I downloaded the source code, too, just to test, and there still is no release option. Thank you once again for your time, and I'll keep trying! – Jason Weber Apr 28 '12 at 00:58
  • 1
    Create a test website and a test application project and work from there. It's not supposed to be there for a website template (see my answer update). – IrishChieftain Apr 28 '12 at 01:06
  • That did it, Irish! The release option is there now. So can I just take the website, put it in the projects folder, and open it that way? Or what should I do now that I already created it as a website? Thanks again! – Jason Weber Apr 28 '12 at 01:29
  • When I made the test project, it created a new tab to the left of "Install Web Components" -- it says "Publish" and in the drop-down box to the right of it, it says "create publish settings". But when I built my solution and opened it up as a project, I don't have this drop down option, so no release option. – Jason Weber Apr 28 '12 at 01:38
  • 1
    I simply update the web.config for Websites - for Web Application projects, I specifically set it to Release in the drop down. The take away from this is that there will be no Release drop down for website projects because the compile model is different. See this for the difference between the two: http://bit.ly/IidpvO – IrishChieftain Apr 28 '12 at 02:18
2

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.

Robbie
  • 18,750
  • 4
  • 41
  • 45
  • 1
    Jason is saying that there is no Release option in the drop down. I'm experiencing the same issue with VS 2010 and VS 2011 beta. – IrishChieftain Apr 27 '12 at 23:25
  • Thank you for taking the time to answer my question, Robbie. I have the standard toolbar visible, and I see where you're at. However, when I click the drop down box for debug, all I see is "debug" and "configuration manager"; there is no "release" option. Again, thank you for taking the time. Any suggestions? – Jason Weber Apr 27 '12 at 23:26
1

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.

Chris Gessler
  • 22,727
  • 7
  • 57
  • 83
  • Thank you Chris .... as I suggested to Robbie, I see where you're at in VS, but in the dropdown box under debug, there's just "debug" and "configuration manager", but no "release" option. Any suggestions? Thanks again for taking the time to answer my question! – Jason Weber Apr 27 '12 at 23:27
  • 1
    If you have removed the "Release" build, you may have to create it again. You can do that also in configuration manager. – Chris Gessler Apr 27 '12 at 23:29
  • Thanks Chris. When I go to build => Configuration Manager, there is only "debug" as an option in the drop-down; again, there is no "release" option. I'll try to do what you suggested, and create the release build in the configuration manager, although I don't know how; I'll google it! Thanks again! – Jason Weber Apr 27 '12 at 23:56
  • Chris, can you explain how this is the answer when the Release option will never appear? I don't get it :) – IrishChieftain Apr 28 '12 at 00:07
  • @IrishChieftain - Becausee the user can still use "Configuration Manager" to add a "Release" build to the solution. – Chris Gessler May 26 '12 at 17:50