Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to restart a Programm in Release-Modus per Code

How to restart a Programm in Release-Modus per Code

Scheduled Pinned Locked Moved C#
csharpvisual-studiohelptutorialquestion
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 11883281
    wrote on last edited by
    #1

    I've Visual Studio and programming in C# now I want my programm to restart on his own, but i need to restart in Release, because a class changed. con you may help me?

    L B U Z 5 Replies Last reply
    0
    • U User 11883281

      I've Visual Studio and programming in C# now I want my programm to restart on his own, but i need to restart in Release, because a class changed. con you may help me?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Member 11916735 wrote:

      con you may help me?

      Help with what? You have not explained where your program is failing. If you just mean that some source code has changed then you need to rebuild and re-install.

      1 Reply Last reply
      0
      • U User 11883281

        I've Visual Studio and programming in C# now I want my programm to restart on his own, but i need to restart in Release, because a class changed. con you may help me?

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        System.Windows.forms.Application.Restart();

        1 Reply Last reply
        0
        • U User 11883281

          I've Visual Studio and programming in C# now I want my programm to restart on his own, but i need to restart in Release, because a class changed. con you may help me?

          B Offline
          B Offline
          Bernhard Hiller
          wrote on last edited by
          #4

          Member 11916735 wrote:

          because a class changed

          Do you mean you changed some code? Then you need to compile your program again. But it does not make sense: how should your program know that its source code was changed? If only some configurable run-time settings changed, just exit your program (e.g. Application.Exit()), but call Process.Start(path_to_your_executable) immediately before that.

          1 Reply Last reply
          0
          • U User 11883281

            I've Visual Studio and programming in C# now I want my programm to restart on his own, but i need to restart in Release, because a class changed. con you may help me?

            U Offline
            U Offline
            User 11883281
            wrote on last edited by
            #5

            i just want to restart my programm with code. but not in the debug modus, in the release modus

            L 1 Reply Last reply
            0
            • U User 11883281

              i just want to restart my programm with code. but not in the debug modus, in the release modus

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              That requires a recompile. The app is either compiled in release- or in debug-mode. There is no on-the-fly switching.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              1 Reply Last reply
              0
              • U User 11883281

                I've Visual Studio and programming in C# now I want my programm to restart on his own, but i need to restart in Release, because a class changed. con you may help me?

                Z Offline
                Z Offline
                ZurdoDev
                wrote on last edited by
                #7

                Change your current Configuration to Release and then run the code. It will compile a release version.

                There are only 10 types of people in the world, those who understand binary and those who don't.

                U 1 Reply Last reply
                0
                • Z ZurdoDev

                  Change your current Configuration to Release and then run the code. It will compile a release version.

                  There are only 10 types of people in the world, those who understand binary and those who don't.

                  U Offline
                  U Offline
                  User 11883281
                  wrote on last edited by
                  #8

                  I know how to start it in debug/release modus with a mouseklick, i just want to do this with a codesnipped

                  P Z 2 Replies Last reply
                  0
                  • U User 11883281

                    I know how to start it in debug/release modus with a mouseklick, i just want to do this with a codesnipped

                    P Offline
                    P Offline
                    Pete OHanlon
                    wrote on last edited by
                    #9

                    Try and explain clearly what problem you are trying to solve. Your description leaves a lot of things out. 1. Is the class changing dynamically, so you need to restart it because it has changed at runtime? 2. How is this class being created? 3. Will the machine you are running your application on have Visual Studio installed on it or not?

                    This space for rent

                    1 Reply Last reply
                    0
                    • U User 11883281

                      I know how to start it in debug/release modus with a mouseklick, i just want to do this with a codesnipped

                      Z Offline
                      Z Offline
                      ZurdoDev
                      wrote on last edited by
                      #10

                      Then use Process.Start() and point to either the debug version or the release version.

                      There are only 10 types of people in the world, those who understand binary and those who don't.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups