start a process in “BUILD EVENTS” in visual studioPost build event execute PowerShellHow do I “Add Existing Item” an entire directory structure in Visual Studio?Should I add the Visual Studio .suo and .user files to source control?What are the various “Build action” settings in Visual Studio project properties and what do they do?How to run Visual Studio post-build events for debug build onlyHow do I add an existing directory tree to a project in Visual Studio?Using Git with Visual Studio.gitignore for Visual Studio Projects and SolutionsDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?How do you auto format code in Visual Studio?Can you force Visual Studio to always run as an Administrator in Windows 8?

Yosemite Fire Rings - What to Expect?

L1 and Ln cache: when are they written?

Is it better practice to read straight from sheet music rather than memorize it?

Drawing ramified coverings with tikz

What should you do if you miss a job interview (deliberately)?

Loading commands from file

Why did the Mercure fail?

Reverse int within the 32-bit signed integer range: [−2^31, 2^31 − 1]

What was the exact wording from Ivanhoe of this advice on how to free yourself from slavery?

It grows, but water kills it

Is the U.S. Code copyrighted by the Government?

Why should universal income be universal?

A social experiment. What is the worst that can happen?

Is this toilet slogan correct usage of the English language?

Where does the bonus feat in the cleric starting package come from?

Freedom of speech and where it applies

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

is this legal and f i dont come up with extra money is the deal off

What is Cash Advance APR?

What does routing an IP address mean?

How should I respond when I lied about my education and the company finds out through background check?

Problem with TransformedDistribution

Creepy dinosaur pc game identification

Added a new user on Ubuntu, set password not working?



start a process in “BUILD EVENTS” in visual studio


Post build event execute PowerShellHow do I “Add Existing Item” an entire directory structure in Visual Studio?Should I add the Visual Studio .suo and .user files to source control?What are the various “Build action” settings in Visual Studio project properties and what do they do?How to run Visual Studio post-build events for debug build onlyHow do I add an existing directory tree to a project in Visual Studio?Using Git with Visual Studio.gitignore for Visual Studio Projects and SolutionsDifference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?How do you auto format code in Visual Studio?Can you force Visual Studio to always run as an Administrator in Windows 8?













1















Does anyone knows how to start a process in "build events" visual studio?
for example



TASKKILL /FI "IMAGENAME eq notepad.exe" /F
sleep 3
if $(ConfigurationName)==Debug @echo do some stuff of building and copyng dll files build
C:notepad.exe


in the last line, it get stuck and it can't finish to build dll.
I try to add ampersand like linux shell to run the process but i didn't have any success.










share|improve this question


























    1















    Does anyone knows how to start a process in "build events" visual studio?
    for example



    TASKKILL /FI "IMAGENAME eq notepad.exe" /F
    sleep 3
    if $(ConfigurationName)==Debug @echo do some stuff of building and copyng dll files build
    C:notepad.exe


    in the last line, it get stuck and it can't finish to build dll.
    I try to add ampersand like linux shell to run the process but i didn't have any success.










    share|improve this question
























      1












      1








      1








      Does anyone knows how to start a process in "build events" visual studio?
      for example



      TASKKILL /FI "IMAGENAME eq notepad.exe" /F
      sleep 3
      if $(ConfigurationName)==Debug @echo do some stuff of building and copyng dll files build
      C:notepad.exe


      in the last line, it get stuck and it can't finish to build dll.
      I try to add ampersand like linux shell to run the process but i didn't have any success.










      share|improve this question














      Does anyone knows how to start a process in "build events" visual studio?
      for example



      TASKKILL /FI "IMAGENAME eq notepad.exe" /F
      sleep 3
      if $(ConfigurationName)==Debug @echo do some stuff of building and copyng dll files build
      C:notepad.exe


      in the last line, it get stuck and it can't finish to build dll.
      I try to add ampersand like linux shell to run the process but i didn't have any success.







      visual-studio






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 26 '12 at 20:10









      Carlitos OverflowCarlitos Overflow

      3213932




      3213932






















          3 Answers
          3






          active

          oldest

          votes


















          2





          +25









          http://ss64.com/nt/start.html



          This "start" command looks promising.






          share|improve this answer























          • "start" command line doesn't work. the entire post build events get stuck.

            – Carlitos Overflow
            Oct 12 '12 at 14:11


















          1














          If you want your post build event to finish while the application started is still running, you can use cmdow:



          C:Toolscmdow.exe /Run C:Windowsnotepad.exe


          Where C:Tools is the path where you extracted the executable to.






          share|improve this answer
































            0














            You can do this by running your build event in an external script file.*



            For example, add this to Post-build event:



            powershell.exe -file "$(ProjectDir)BuildPost-build.ps1" -ConfigurationName "$(ConfigurationName)" -PlatformName "$(PlatformName)" -TargetDir "$(TargetDir)"


            and create this file under project directory:



            BuildPost-build.ps1



            param(
            [string]$ConfigurationName,
            [string]$PlatformName,
            [string]$TargetDir
            )

            #[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
            #[void][System.Windows.Forms.MessageBox]::Show("It works.")

            Get-Process Notepad | kill
            Start-Sleep -seconds 1
            if ($ConfigurationName -eq 'Debug')

            # Run some debug configuration tasks


            Start-Process C:notepad.exe


            * Taken from this answer with some modification.






            share|improve this answer
























              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f12609599%2fstart-a-process-in-build-events-in-visual-studio%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2





              +25









              http://ss64.com/nt/start.html



              This "start" command looks promising.






              share|improve this answer























              • "start" command line doesn't work. the entire post build events get stuck.

                – Carlitos Overflow
                Oct 12 '12 at 14:11















              2





              +25









              http://ss64.com/nt/start.html



              This "start" command looks promising.






              share|improve this answer























              • "start" command line doesn't work. the entire post build events get stuck.

                – Carlitos Overflow
                Oct 12 '12 at 14:11













              2





              +25







              2





              +25



              2




              +25





              http://ss64.com/nt/start.html



              This "start" command looks promising.






              share|improve this answer













              http://ss64.com/nt/start.html



              This "start" command looks promising.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Oct 11 '12 at 23:10









              phyattphyatt

              14.4k23254




              14.4k23254












              • "start" command line doesn't work. the entire post build events get stuck.

                – Carlitos Overflow
                Oct 12 '12 at 14:11

















              • "start" command line doesn't work. the entire post build events get stuck.

                – Carlitos Overflow
                Oct 12 '12 at 14:11
















              "start" command line doesn't work. the entire post build events get stuck.

              – Carlitos Overflow
              Oct 12 '12 at 14:11





              "start" command line doesn't work. the entire post build events get stuck.

              – Carlitos Overflow
              Oct 12 '12 at 14:11













              1














              If you want your post build event to finish while the application started is still running, you can use cmdow:



              C:Toolscmdow.exe /Run C:Windowsnotepad.exe


              Where C:Tools is the path where you extracted the executable to.






              share|improve this answer





























                1














                If you want your post build event to finish while the application started is still running, you can use cmdow:



                C:Toolscmdow.exe /Run C:Windowsnotepad.exe


                Where C:Tools is the path where you extracted the executable to.






                share|improve this answer



























                  1












                  1








                  1







                  If you want your post build event to finish while the application started is still running, you can use cmdow:



                  C:Toolscmdow.exe /Run C:Windowsnotepad.exe


                  Where C:Tools is the path where you extracted the executable to.






                  share|improve this answer















                  If you want your post build event to finish while the application started is still running, you can use cmdow:



                  C:Toolscmdow.exe /Run C:Windowsnotepad.exe


                  Where C:Tools is the path where you extracted the executable to.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Mar 8 at 4:18









                  orad

                  5,891135285




                  5,891135285










                  answered Oct 5 '12 at 15:03









                  GeneGene

                  3,12552342




                  3,12552342





















                      0














                      You can do this by running your build event in an external script file.*



                      For example, add this to Post-build event:



                      powershell.exe -file "$(ProjectDir)BuildPost-build.ps1" -ConfigurationName "$(ConfigurationName)" -PlatformName "$(PlatformName)" -TargetDir "$(TargetDir)"


                      and create this file under project directory:



                      BuildPost-build.ps1



                      param(
                      [string]$ConfigurationName,
                      [string]$PlatformName,
                      [string]$TargetDir
                      )

                      #[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
                      #[void][System.Windows.Forms.MessageBox]::Show("It works.")

                      Get-Process Notepad | kill
                      Start-Sleep -seconds 1
                      if ($ConfigurationName -eq 'Debug')

                      # Run some debug configuration tasks


                      Start-Process C:notepad.exe


                      * Taken from this answer with some modification.






                      share|improve this answer





























                        0














                        You can do this by running your build event in an external script file.*



                        For example, add this to Post-build event:



                        powershell.exe -file "$(ProjectDir)BuildPost-build.ps1" -ConfigurationName "$(ConfigurationName)" -PlatformName "$(PlatformName)" -TargetDir "$(TargetDir)"


                        and create this file under project directory:



                        BuildPost-build.ps1



                        param(
                        [string]$ConfigurationName,
                        [string]$PlatformName,
                        [string]$TargetDir
                        )

                        #[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
                        #[void][System.Windows.Forms.MessageBox]::Show("It works.")

                        Get-Process Notepad | kill
                        Start-Sleep -seconds 1
                        if ($ConfigurationName -eq 'Debug')

                        # Run some debug configuration tasks


                        Start-Process C:notepad.exe


                        * Taken from this answer with some modification.






                        share|improve this answer



























                          0












                          0








                          0







                          You can do this by running your build event in an external script file.*



                          For example, add this to Post-build event:



                          powershell.exe -file "$(ProjectDir)BuildPost-build.ps1" -ConfigurationName "$(ConfigurationName)" -PlatformName "$(PlatformName)" -TargetDir "$(TargetDir)"


                          and create this file under project directory:



                          BuildPost-build.ps1



                          param(
                          [string]$ConfigurationName,
                          [string]$PlatformName,
                          [string]$TargetDir
                          )

                          #[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
                          #[void][System.Windows.Forms.MessageBox]::Show("It works.")

                          Get-Process Notepad | kill
                          Start-Sleep -seconds 1
                          if ($ConfigurationName -eq 'Debug')

                          # Run some debug configuration tasks


                          Start-Process C:notepad.exe


                          * Taken from this answer with some modification.






                          share|improve this answer















                          You can do this by running your build event in an external script file.*



                          For example, add this to Post-build event:



                          powershell.exe -file "$(ProjectDir)BuildPost-build.ps1" -ConfigurationName "$(ConfigurationName)" -PlatformName "$(PlatformName)" -TargetDir "$(TargetDir)"


                          and create this file under project directory:



                          BuildPost-build.ps1



                          param(
                          [string]$ConfigurationName,
                          [string]$PlatformName,
                          [string]$TargetDir
                          )

                          #[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
                          #[void][System.Windows.Forms.MessageBox]::Show("It works.")

                          Get-Process Notepad | kill
                          Start-Sleep -seconds 1
                          if ($ConfigurationName -eq 'Debug')

                          # Run some debug configuration tasks


                          Start-Process C:notepad.exe


                          * Taken from this answer with some modification.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Mar 8 at 6:46

























                          answered Mar 8 at 6:39









                          oradorad

                          5,891135285




                          5,891135285



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f12609599%2fstart-a-process-in-build-events-in-visual-studio%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

                              Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

                              List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229