How to disable TestResults folder in Visual Studio?











up vote
4
down vote

favorite
1












Visual Studio is generating a lot of empty folders in the TestResults subfolder of C# projects. Is there a way to disable it? I often delete more then 5k of them.




Deploy_UserName 2017-10-31 18_13_17
Deploy_UserName 2017-10-31 18_57_15
Deploy_UserName 2017-10-31 19_18_32
Deploy_UserName 2017-10-31 19_19_47
Deploy_UserName 2017-10-31 19_20_21
Deploy_UserName 2017-10-31 19_20_26
Deploy_UserName 2017-11-02 16_33_32
Deploy_UserName 2017-11-02 16_34_11
Deploy_UserName 2017-11-02 16_45_12
Deploy_UserName 2017-11-02 16_45_39
Deploy_UserName 2017-11-02 17_09_55



And this goes like that a few thousand tiems. All are empty.



I'm not sure if they actually slow VS down but I'd rather not have them.










share|improve this question


























    up vote
    4
    down vote

    favorite
    1












    Visual Studio is generating a lot of empty folders in the TestResults subfolder of C# projects. Is there a way to disable it? I often delete more then 5k of them.




    Deploy_UserName 2017-10-31 18_13_17
    Deploy_UserName 2017-10-31 18_57_15
    Deploy_UserName 2017-10-31 19_18_32
    Deploy_UserName 2017-10-31 19_19_47
    Deploy_UserName 2017-10-31 19_20_21
    Deploy_UserName 2017-10-31 19_20_26
    Deploy_UserName 2017-11-02 16_33_32
    Deploy_UserName 2017-11-02 16_34_11
    Deploy_UserName 2017-11-02 16_45_12
    Deploy_UserName 2017-11-02 16_45_39
    Deploy_UserName 2017-11-02 17_09_55



    And this goes like that a few thousand tiems. All are empty.



    I'm not sure if they actually slow VS down but I'd rather not have them.










    share|improve this question
























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      Visual Studio is generating a lot of empty folders in the TestResults subfolder of C# projects. Is there a way to disable it? I often delete more then 5k of them.




      Deploy_UserName 2017-10-31 18_13_17
      Deploy_UserName 2017-10-31 18_57_15
      Deploy_UserName 2017-10-31 19_18_32
      Deploy_UserName 2017-10-31 19_19_47
      Deploy_UserName 2017-10-31 19_20_21
      Deploy_UserName 2017-10-31 19_20_26
      Deploy_UserName 2017-11-02 16_33_32
      Deploy_UserName 2017-11-02 16_34_11
      Deploy_UserName 2017-11-02 16_45_12
      Deploy_UserName 2017-11-02 16_45_39
      Deploy_UserName 2017-11-02 17_09_55



      And this goes like that a few thousand tiems. All are empty.



      I'm not sure if they actually slow VS down but I'd rather not have them.










      share|improve this question













      Visual Studio is generating a lot of empty folders in the TestResults subfolder of C# projects. Is there a way to disable it? I often delete more then 5k of them.




      Deploy_UserName 2017-10-31 18_13_17
      Deploy_UserName 2017-10-31 18_57_15
      Deploy_UserName 2017-10-31 19_18_32
      Deploy_UserName 2017-10-31 19_19_47
      Deploy_UserName 2017-10-31 19_20_21
      Deploy_UserName 2017-10-31 19_20_26
      Deploy_UserName 2017-11-02 16_33_32
      Deploy_UserName 2017-11-02 16_34_11
      Deploy_UserName 2017-11-02 16_45_12
      Deploy_UserName 2017-11-02 16_45_39
      Deploy_UserName 2017-11-02 17_09_55



      And this goes like that a few thousand tiems. All are empty.



      I'm not sure if they actually slow VS down but I'd rather not have them.







      visual-studio-2017






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '17 at 17:45









      t3chb0t

      19012




      19012






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          I didn't find a way how to disable it completely but at least an acceptable workaround. It moves them to a location that is more appropriate for them. It goes like that:





          • Create a .runsettings file in your solution directory (you can give it any name - just keep the extension unchanged) with the following contents which will place the TestResults directory in the %temp% location of your machine. If you're not sure where it is, you can always check it in the command-line by calling echo %test% or just pick any other location.



            <?xml version="1.0" encoding="utf-8"?>
            <RunSettings>

            <RunConfiguration>
            <ResultsDirectory>%temp%TestResults</ResultsDirectory>
            </RunConfiguration>

            </RunSettings>



          • You now have to inform your test runner about it.




            • for MSTest users: go to Test > Test Settings > Select Test Settings File

            • for ReSharper users: go to ReSharper > Options > Tools > Unit Testing > Ms Test and pick the Use specific test settings file.




          btw, these folders are created always and just won't be deleted if you interrupt the test-runner so it won't clean them up.



          (Inspired by Configure unit tests by using a .runsettings file)






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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',
            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%2fsuperuser.com%2fquestions%2f1267698%2fhow-to-disable-testresults-folder-in-visual-studio%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            I didn't find a way how to disable it completely but at least an acceptable workaround. It moves them to a location that is more appropriate for them. It goes like that:





            • Create a .runsettings file in your solution directory (you can give it any name - just keep the extension unchanged) with the following contents which will place the TestResults directory in the %temp% location of your machine. If you're not sure where it is, you can always check it in the command-line by calling echo %test% or just pick any other location.



              <?xml version="1.0" encoding="utf-8"?>
              <RunSettings>

              <RunConfiguration>
              <ResultsDirectory>%temp%TestResults</ResultsDirectory>
              </RunConfiguration>

              </RunSettings>



            • You now have to inform your test runner about it.




              • for MSTest users: go to Test > Test Settings > Select Test Settings File

              • for ReSharper users: go to ReSharper > Options > Tools > Unit Testing > Ms Test and pick the Use specific test settings file.




            btw, these folders are created always and just won't be deleted if you interrupt the test-runner so it won't clean them up.



            (Inspired by Configure unit tests by using a .runsettings file)






            share|improve this answer

























              up vote
              0
              down vote



              accepted










              I didn't find a way how to disable it completely but at least an acceptable workaround. It moves them to a location that is more appropriate for them. It goes like that:





              • Create a .runsettings file in your solution directory (you can give it any name - just keep the extension unchanged) with the following contents which will place the TestResults directory in the %temp% location of your machine. If you're not sure where it is, you can always check it in the command-line by calling echo %test% or just pick any other location.



                <?xml version="1.0" encoding="utf-8"?>
                <RunSettings>

                <RunConfiguration>
                <ResultsDirectory>%temp%TestResults</ResultsDirectory>
                </RunConfiguration>

                </RunSettings>



              • You now have to inform your test runner about it.




                • for MSTest users: go to Test > Test Settings > Select Test Settings File

                • for ReSharper users: go to ReSharper > Options > Tools > Unit Testing > Ms Test and pick the Use specific test settings file.




              btw, these folders are created always and just won't be deleted if you interrupt the test-runner so it won't clean them up.



              (Inspired by Configure unit tests by using a .runsettings file)






              share|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                I didn't find a way how to disable it completely but at least an acceptable workaround. It moves them to a location that is more appropriate for them. It goes like that:





                • Create a .runsettings file in your solution directory (you can give it any name - just keep the extension unchanged) with the following contents which will place the TestResults directory in the %temp% location of your machine. If you're not sure where it is, you can always check it in the command-line by calling echo %test% or just pick any other location.



                  <?xml version="1.0" encoding="utf-8"?>
                  <RunSettings>

                  <RunConfiguration>
                  <ResultsDirectory>%temp%TestResults</ResultsDirectory>
                  </RunConfiguration>

                  </RunSettings>



                • You now have to inform your test runner about it.




                  • for MSTest users: go to Test > Test Settings > Select Test Settings File

                  • for ReSharper users: go to ReSharper > Options > Tools > Unit Testing > Ms Test and pick the Use specific test settings file.




                btw, these folders are created always and just won't be deleted if you interrupt the test-runner so it won't clean them up.



                (Inspired by Configure unit tests by using a .runsettings file)






                share|improve this answer












                I didn't find a way how to disable it completely but at least an acceptable workaround. It moves them to a location that is more appropriate for them. It goes like that:





                • Create a .runsettings file in your solution directory (you can give it any name - just keep the extension unchanged) with the following contents which will place the TestResults directory in the %temp% location of your machine. If you're not sure where it is, you can always check it in the command-line by calling echo %test% or just pick any other location.



                  <?xml version="1.0" encoding="utf-8"?>
                  <RunSettings>

                  <RunConfiguration>
                  <ResultsDirectory>%temp%TestResults</ResultsDirectory>
                  </RunConfiguration>

                  </RunSettings>



                • You now have to inform your test runner about it.




                  • for MSTest users: go to Test > Test Settings > Select Test Settings File

                  • for ReSharper users: go to ReSharper > Options > Tools > Unit Testing > Ms Test and pick the Use specific test settings file.




                btw, these folders are created always and just won't be deleted if you interrupt the test-runner so it won't clean them up.



                (Inspired by Configure unit tests by using a .runsettings file)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 18 at 10:18









                t3chb0t

                19012




                19012






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1267698%2fhow-to-disable-testresults-folder-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

                    What is the Guru Parampara of Kashmiri Shaivism?

                    Герой Советского Союза

                    AnyDesk - Fatal Program Failure