Results 1 to 6 of 6

Thread: optimize code option in vs2008 c# build page

  1. #1

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    optimize code option in vs2008 c# build page




    I stumbled onto this while tooling around in the propertys of one of my projects.

    I thought gave it a try just to see if there was any noticeable diffrence there wasn't but its a small project


    I did however notice that i could no longer edit my code while debuging at runtime (like add comments or change values of strings)


    So what is it exactly that this check box is supposed to do?

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: optimize code option in vs2008 c# build page

    I believe that is used when you already need to deploy your application.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    Re: optimize code option in vs2008 c# build page

    I guess. It just seems weird that it wouldn't do that for you already if it was thats simple

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: optimize code option in vs2008 c# build page

    Without optimistions your code is compiled exactly as is. With optimisations enabled your code may be rearranged to remove redundancies and make memory usage and performance more optimal. That's why you can't edit the code while debugging: because what you see may not actually be what's getting executed.

    Normally you disable optimisations while debugging and enable them when releasing. That is the default for the Debug and Release build configurations but if you add any new configurations of your own you'll have to decide which it's to be.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Fanatic Member Crash893's Avatar
    Join Date
    Dec 2005
    Posts
    930

    Re: optimize code option in vs2008 c# build page

    thats a great idea

    How would you enable optimization for release and disable for debug automatically?

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: optimize code option in vs2008 c# build page

    As JM said it should be the default when you build for Debug or Release, that said it should be automatic.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width