Best way to deploy Visual Studio application that can run without installing











up vote
66
down vote

favorite
36












I wrote a fairly simple application with C#/.NET and can't figure out a good way to publish it. It's a sort of a "tool" that users would only run once, or run every few months. Because of this, I'm hoping that there is a way I could deploy it where it wouldn't need installing to run (it could just be run by double clicking an EXE file straight after downloading).



However, it still needs (somehow) to include the correct version of .NET, libraries, etc. so it will run correctly. I know this is included when using ClickOnce, but that still installs the application onto the user's computer.



Is there a way this can be done?



EDIT - binDebug



myAppName.application
myAppName.exe
myAppName.exe.config
myAppName.exe.manifest
myAppName.pdb
myAppName.vshost.application
myAppName.vshost.exe
myAppName.vshost.exe.config
myAppName.vshost.exe.manifest
extraLibrary.dll


as well as two folders



app.publish
Resources









share|improve this question




























    up vote
    66
    down vote

    favorite
    36












    I wrote a fairly simple application with C#/.NET and can't figure out a good way to publish it. It's a sort of a "tool" that users would only run once, or run every few months. Because of this, I'm hoping that there is a way I could deploy it where it wouldn't need installing to run (it could just be run by double clicking an EXE file straight after downloading).



    However, it still needs (somehow) to include the correct version of .NET, libraries, etc. so it will run correctly. I know this is included when using ClickOnce, but that still installs the application onto the user's computer.



    Is there a way this can be done?



    EDIT - binDebug



    myAppName.application
    myAppName.exe
    myAppName.exe.config
    myAppName.exe.manifest
    myAppName.pdb
    myAppName.vshost.application
    myAppName.vshost.exe
    myAppName.vshost.exe.config
    myAppName.vshost.exe.manifest
    extraLibrary.dll


    as well as two folders



    app.publish
    Resources









    share|improve this question


























      up vote
      66
      down vote

      favorite
      36









      up vote
      66
      down vote

      favorite
      36






      36





      I wrote a fairly simple application with C#/.NET and can't figure out a good way to publish it. It's a sort of a "tool" that users would only run once, or run every few months. Because of this, I'm hoping that there is a way I could deploy it where it wouldn't need installing to run (it could just be run by double clicking an EXE file straight after downloading).



      However, it still needs (somehow) to include the correct version of .NET, libraries, etc. so it will run correctly. I know this is included when using ClickOnce, but that still installs the application onto the user's computer.



      Is there a way this can be done?



      EDIT - binDebug



      myAppName.application
      myAppName.exe
      myAppName.exe.config
      myAppName.exe.manifest
      myAppName.pdb
      myAppName.vshost.application
      myAppName.vshost.exe
      myAppName.vshost.exe.config
      myAppName.vshost.exe.manifest
      extraLibrary.dll


      as well as two folders



      app.publish
      Resources









      share|improve this question















      I wrote a fairly simple application with C#/.NET and can't figure out a good way to publish it. It's a sort of a "tool" that users would only run once, or run every few months. Because of this, I'm hoping that there is a way I could deploy it where it wouldn't need installing to run (it could just be run by double clicking an EXE file straight after downloading).



      However, it still needs (somehow) to include the correct version of .NET, libraries, etc. so it will run correctly. I know this is included when using ClickOnce, but that still installs the application onto the user's computer.



      Is there a way this can be done?



      EDIT - binDebug



      myAppName.application
      myAppName.exe
      myAppName.exe.config
      myAppName.exe.manifest
      myAppName.pdb
      myAppName.vshost.application
      myAppName.vshost.exe
      myAppName.vshost.exe.config
      myAppName.vshost.exe.manifest
      extraLibrary.dll


      as well as two folders



      app.publish
      Resources






      c# deployment visual-studio-2012 install clickonce






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 6 '13 at 20:24

























      asked Jun 5 '13 at 17:24









      Wilson

      3,206155092




      3,206155092
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          87
          down vote



          accepted










          It is possible and is deceptively easy:




          1. "Publish" the application (to, say, some folder on drive C), either from menu Build or from the project's properties → Publish. This will create an installer for a ClickOnce application.

          2. But instead of using the produced installer, find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).

          3. Zip that folder (leave out any *.vhost.* files and the app.publish folder (they are not needed), and the .pdb files unless you foresee debugging directly on your user's system (for example, by remote control)), and provide it to the users.


          An added advantage is that, as a ClickOnce application, it does not require administrative privileges to run (if your application follows the normal guidelines for which folders to use for application data, etc.).



          As for .NET, you can check for the minimum required version of .NET being installed (or at all) in the application (most users will already have it installed) and present a dialog with a link to the download page on the Microsoft website (or point to one of your pages that could redirect to the Microsoft page - this makes it more robust if the Microsoft URL change). As it is a small utility, you could target .NET 2.0 to reduce the probability of a user to have to install .NET.



          It works. We use this method during development and test to avoid having to constantly uninstall and install the application and still being quite close to how the final application will run.






          share|improve this answer



















          • 1




            Great, thanks for a really thorough answer.
            – Wilson
            Jun 6 '13 at 21:41






          • 1




            Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
            – JulienVan
            Feb 27 '14 at 7:49






          • 35




            Out of curiosity, how is this different from copying the files straight from binRelease?
            – Eric Eskildsen
            Jun 10 '15 at 19:19






          • 8




            I would also like to know how is this different from copying the files straight from binRelease?
            – CoDeGiRl
            Jun 17 '15 at 18:53






          • 1




            really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
            – Mohammed Sufian
            Jan 31 '16 at 16:52




















          up vote
          1
          down vote













          First you need to publish the file by:




          1. BUILD -> PUBLISH or by right clicking project on Solution Explorer -> properties -> publish or select project in Solution Explorer and press Alt + Enter
            NOTE: if you are using Visual Studio 2013 then in properties you have to go to BUILD and then you have to disable define DEBUG constant and define TRACE constant and you are ready to go.
            Representation


          2. Save your file to a particular folder.
            Find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).
            In Visual Studio they are in the Application Files folder and inside that you just need the .exe and dll files.
            (You have to delete ClickOnce and other files and then make this folder a zip file and distribute it.)



          NOTE: The ClickOnce application does install the project to system, but it has one advantage. You DO NOT require administrative privileges here to run (if your application follows the normal guidelines for which folders to use for application data, etc.).






          share|improve this answer



















          • 2




            Why do you need to set DEBUG and TRACE to particular values?
            – Peter Mortensen
            Oct 7 '15 at 9:40






          • 2




            nice explanation.... didnt get anything
            – Pentarex
            Aug 12 '16 at 13:02






          • 1




            Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
            – abe312
            Oct 11 '16 at 16:02








          • 1




            I don't see anything called "Publish" in VS2015
            – DaveInCaz
            Sep 1 '17 at 13:17






          • 1




            Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
            – Peter Mortensen
            Oct 29 '17 at 17:19













          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',
          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%2f16946173%2fbest-way-to-deploy-visual-studio-application-that-can-run-without-installing%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          87
          down vote



          accepted










          It is possible and is deceptively easy:




          1. "Publish" the application (to, say, some folder on drive C), either from menu Build or from the project's properties → Publish. This will create an installer for a ClickOnce application.

          2. But instead of using the produced installer, find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).

          3. Zip that folder (leave out any *.vhost.* files and the app.publish folder (they are not needed), and the .pdb files unless you foresee debugging directly on your user's system (for example, by remote control)), and provide it to the users.


          An added advantage is that, as a ClickOnce application, it does not require administrative privileges to run (if your application follows the normal guidelines for which folders to use for application data, etc.).



          As for .NET, you can check for the minimum required version of .NET being installed (or at all) in the application (most users will already have it installed) and present a dialog with a link to the download page on the Microsoft website (or point to one of your pages that could redirect to the Microsoft page - this makes it more robust if the Microsoft URL change). As it is a small utility, you could target .NET 2.0 to reduce the probability of a user to have to install .NET.



          It works. We use this method during development and test to avoid having to constantly uninstall and install the application and still being quite close to how the final application will run.






          share|improve this answer



















          • 1




            Great, thanks for a really thorough answer.
            – Wilson
            Jun 6 '13 at 21:41






          • 1




            Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
            – JulienVan
            Feb 27 '14 at 7:49






          • 35




            Out of curiosity, how is this different from copying the files straight from binRelease?
            – Eric Eskildsen
            Jun 10 '15 at 19:19






          • 8




            I would also like to know how is this different from copying the files straight from binRelease?
            – CoDeGiRl
            Jun 17 '15 at 18:53






          • 1




            really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
            – Mohammed Sufian
            Jan 31 '16 at 16:52

















          up vote
          87
          down vote



          accepted










          It is possible and is deceptively easy:




          1. "Publish" the application (to, say, some folder on drive C), either from menu Build or from the project's properties → Publish. This will create an installer for a ClickOnce application.

          2. But instead of using the produced installer, find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).

          3. Zip that folder (leave out any *.vhost.* files and the app.publish folder (they are not needed), and the .pdb files unless you foresee debugging directly on your user's system (for example, by remote control)), and provide it to the users.


          An added advantage is that, as a ClickOnce application, it does not require administrative privileges to run (if your application follows the normal guidelines for which folders to use for application data, etc.).



          As for .NET, you can check for the minimum required version of .NET being installed (or at all) in the application (most users will already have it installed) and present a dialog with a link to the download page on the Microsoft website (or point to one of your pages that could redirect to the Microsoft page - this makes it more robust if the Microsoft URL change). As it is a small utility, you could target .NET 2.0 to reduce the probability of a user to have to install .NET.



          It works. We use this method during development and test to avoid having to constantly uninstall and install the application and still being quite close to how the final application will run.






          share|improve this answer



















          • 1




            Great, thanks for a really thorough answer.
            – Wilson
            Jun 6 '13 at 21:41






          • 1




            Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
            – JulienVan
            Feb 27 '14 at 7:49






          • 35




            Out of curiosity, how is this different from copying the files straight from binRelease?
            – Eric Eskildsen
            Jun 10 '15 at 19:19






          • 8




            I would also like to know how is this different from copying the files straight from binRelease?
            – CoDeGiRl
            Jun 17 '15 at 18:53






          • 1




            really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
            – Mohammed Sufian
            Jan 31 '16 at 16:52















          up vote
          87
          down vote



          accepted







          up vote
          87
          down vote



          accepted






          It is possible and is deceptively easy:




          1. "Publish" the application (to, say, some folder on drive C), either from menu Build or from the project's properties → Publish. This will create an installer for a ClickOnce application.

          2. But instead of using the produced installer, find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).

          3. Zip that folder (leave out any *.vhost.* files and the app.publish folder (they are not needed), and the .pdb files unless you foresee debugging directly on your user's system (for example, by remote control)), and provide it to the users.


          An added advantage is that, as a ClickOnce application, it does not require administrative privileges to run (if your application follows the normal guidelines for which folders to use for application data, etc.).



          As for .NET, you can check for the minimum required version of .NET being installed (or at all) in the application (most users will already have it installed) and present a dialog with a link to the download page on the Microsoft website (or point to one of your pages that could redirect to the Microsoft page - this makes it more robust if the Microsoft URL change). As it is a small utility, you could target .NET 2.0 to reduce the probability of a user to have to install .NET.



          It works. We use this method during development and test to avoid having to constantly uninstall and install the application and still being quite close to how the final application will run.






          share|improve this answer














          It is possible and is deceptively easy:




          1. "Publish" the application (to, say, some folder on drive C), either from menu Build or from the project's properties → Publish. This will create an installer for a ClickOnce application.

          2. But instead of using the produced installer, find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).

          3. Zip that folder (leave out any *.vhost.* files and the app.publish folder (they are not needed), and the .pdb files unless you foresee debugging directly on your user's system (for example, by remote control)), and provide it to the users.


          An added advantage is that, as a ClickOnce application, it does not require administrative privileges to run (if your application follows the normal guidelines for which folders to use for application data, etc.).



          As for .NET, you can check for the minimum required version of .NET being installed (or at all) in the application (most users will already have it installed) and present a dialog with a link to the download page on the Microsoft website (or point to one of your pages that could redirect to the Microsoft page - this makes it more robust if the Microsoft URL change). As it is a small utility, you could target .NET 2.0 to reduce the probability of a user to have to install .NET.



          It works. We use this method during development and test to avoid having to constantly uninstall and install the application and still being quite close to how the final application will run.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 25 at 9:47

























          answered Jun 5 '13 at 21:23









          Peter Mortensen

          13.4k1983111




          13.4k1983111








          • 1




            Great, thanks for a really thorough answer.
            – Wilson
            Jun 6 '13 at 21:41






          • 1




            Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
            – JulienVan
            Feb 27 '14 at 7:49






          • 35




            Out of curiosity, how is this different from copying the files straight from binRelease?
            – Eric Eskildsen
            Jun 10 '15 at 19:19






          • 8




            I would also like to know how is this different from copying the files straight from binRelease?
            – CoDeGiRl
            Jun 17 '15 at 18:53






          • 1




            really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
            – Mohammed Sufian
            Jan 31 '16 at 16:52
















          • 1




            Great, thanks for a really thorough answer.
            – Wilson
            Jun 6 '13 at 21:41






          • 1




            Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
            – JulienVan
            Feb 27 '14 at 7:49






          • 35




            Out of curiosity, how is this different from copying the files straight from binRelease?
            – Eric Eskildsen
            Jun 10 '15 at 19:19






          • 8




            I would also like to know how is this different from copying the files straight from binRelease?
            – CoDeGiRl
            Jun 17 '15 at 18:53






          • 1




            really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
            – Mohammed Sufian
            Jan 31 '16 at 16:52










          1




          1




          Great, thanks for a really thorough answer.
          – Wilson
          Jun 6 '13 at 21:41




          Great, thanks for a really thorough answer.
          – Wilson
          Jun 6 '13 at 21:41




          1




          1




          Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
          – JulienVan
          Feb 27 '14 at 7:49




          Thanks, it works like a charm! I had to use the 'Application Files...' button of the Publish properties of my project to force including all referenced DLLs, as all references are not included by default.
          – JulienVan
          Feb 27 '14 at 7:49




          35




          35




          Out of curiosity, how is this different from copying the files straight from binRelease?
          – Eric Eskildsen
          Jun 10 '15 at 19:19




          Out of curiosity, how is this different from copying the files straight from binRelease?
          – Eric Eskildsen
          Jun 10 '15 at 19:19




          8




          8




          I would also like to know how is this different from copying the files straight from binRelease?
          – CoDeGiRl
          Jun 17 '15 at 18:53




          I would also like to know how is this different from copying the files straight from binRelease?
          – CoDeGiRl
          Jun 17 '15 at 18:53




          1




          1




          really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
          – Mohammed Sufian
          Jan 31 '16 at 16:52






          really great answer, I copied all the listed files from Application Files at publish tab and .application, .manifest, .config, .exe and other dlls.. thanks sir for the 2nd point in your answer :) ..
          – Mohammed Sufian
          Jan 31 '16 at 16:52














          up vote
          1
          down vote













          First you need to publish the file by:




          1. BUILD -> PUBLISH or by right clicking project on Solution Explorer -> properties -> publish or select project in Solution Explorer and press Alt + Enter
            NOTE: if you are using Visual Studio 2013 then in properties you have to go to BUILD and then you have to disable define DEBUG constant and define TRACE constant and you are ready to go.
            Representation


          2. Save your file to a particular folder.
            Find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).
            In Visual Studio they are in the Application Files folder and inside that you just need the .exe and dll files.
            (You have to delete ClickOnce and other files and then make this folder a zip file and distribute it.)



          NOTE: The ClickOnce application does install the project to system, but it has one advantage. You DO NOT require administrative privileges here to run (if your application follows the normal guidelines for which folders to use for application data, etc.).






          share|improve this answer



















          • 2




            Why do you need to set DEBUG and TRACE to particular values?
            – Peter Mortensen
            Oct 7 '15 at 9:40






          • 2




            nice explanation.... didnt get anything
            – Pentarex
            Aug 12 '16 at 13:02






          • 1




            Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
            – abe312
            Oct 11 '16 at 16:02








          • 1




            I don't see anything called "Publish" in VS2015
            – DaveInCaz
            Sep 1 '17 at 13:17






          • 1




            Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
            – Peter Mortensen
            Oct 29 '17 at 17:19

















          up vote
          1
          down vote













          First you need to publish the file by:




          1. BUILD -> PUBLISH or by right clicking project on Solution Explorer -> properties -> publish or select project in Solution Explorer and press Alt + Enter
            NOTE: if you are using Visual Studio 2013 then in properties you have to go to BUILD and then you have to disable define DEBUG constant and define TRACE constant and you are ready to go.
            Representation


          2. Save your file to a particular folder.
            Find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).
            In Visual Studio they are in the Application Files folder and inside that you just need the .exe and dll files.
            (You have to delete ClickOnce and other files and then make this folder a zip file and distribute it.)



          NOTE: The ClickOnce application does install the project to system, but it has one advantage. You DO NOT require administrative privileges here to run (if your application follows the normal guidelines for which folders to use for application data, etc.).






          share|improve this answer



















          • 2




            Why do you need to set DEBUG and TRACE to particular values?
            – Peter Mortensen
            Oct 7 '15 at 9:40






          • 2




            nice explanation.... didnt get anything
            – Pentarex
            Aug 12 '16 at 13:02






          • 1




            Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
            – abe312
            Oct 11 '16 at 16:02








          • 1




            I don't see anything called "Publish" in VS2015
            – DaveInCaz
            Sep 1 '17 at 13:17






          • 1




            Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
            – Peter Mortensen
            Oct 29 '17 at 17:19















          up vote
          1
          down vote










          up vote
          1
          down vote









          First you need to publish the file by:




          1. BUILD -> PUBLISH or by right clicking project on Solution Explorer -> properties -> publish or select project in Solution Explorer and press Alt + Enter
            NOTE: if you are using Visual Studio 2013 then in properties you have to go to BUILD and then you have to disable define DEBUG constant and define TRACE constant and you are ready to go.
            Representation


          2. Save your file to a particular folder.
            Find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).
            In Visual Studio they are in the Application Files folder and inside that you just need the .exe and dll files.
            (You have to delete ClickOnce and other files and then make this folder a zip file and distribute it.)



          NOTE: The ClickOnce application does install the project to system, but it has one advantage. You DO NOT require administrative privileges here to run (if your application follows the normal guidelines for which folders to use for application data, etc.).






          share|improve this answer














          First you need to publish the file by:




          1. BUILD -> PUBLISH or by right clicking project on Solution Explorer -> properties -> publish or select project in Solution Explorer and press Alt + Enter
            NOTE: if you are using Visual Studio 2013 then in properties you have to go to BUILD and then you have to disable define DEBUG constant and define TRACE constant and you are ready to go.
            Representation


          2. Save your file to a particular folder.
            Find the produced files (the EXE file and the .config, .manifest, and .application files, along with any DLL files, etc.) - they are all in the same folder and typically in the binDebug folder below the project file (.csproj).
            In Visual Studio they are in the Application Files folder and inside that you just need the .exe and dll files.
            (You have to delete ClickOnce and other files and then make this folder a zip file and distribute it.)



          NOTE: The ClickOnce application does install the project to system, but it has one advantage. You DO NOT require administrative privileges here to run (if your application follows the normal guidelines for which folders to use for application data, etc.).







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 16 '16 at 8:25









          Peter Mortensen

          13.4k1983111




          13.4k1983111










          answered Oct 5 '15 at 20:54









          abe312

          2,7152518




          2,7152518








          • 2




            Why do you need to set DEBUG and TRACE to particular values?
            – Peter Mortensen
            Oct 7 '15 at 9:40






          • 2




            nice explanation.... didnt get anything
            – Pentarex
            Aug 12 '16 at 13:02






          • 1




            Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
            – abe312
            Oct 11 '16 at 16:02








          • 1




            I don't see anything called "Publish" in VS2015
            – DaveInCaz
            Sep 1 '17 at 13:17






          • 1




            Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
            – Peter Mortensen
            Oct 29 '17 at 17:19
















          • 2




            Why do you need to set DEBUG and TRACE to particular values?
            – Peter Mortensen
            Oct 7 '15 at 9:40






          • 2




            nice explanation.... didnt get anything
            – Pentarex
            Aug 12 '16 at 13:02






          • 1




            Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
            – abe312
            Oct 11 '16 at 16:02








          • 1




            I don't see anything called "Publish" in VS2015
            – DaveInCaz
            Sep 1 '17 at 13:17






          • 1




            Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
            – Peter Mortensen
            Oct 29 '17 at 17:19










          2




          2




          Why do you need to set DEBUG and TRACE to particular values?
          – Peter Mortensen
          Oct 7 '15 at 9:40




          Why do you need to set DEBUG and TRACE to particular values?
          – Peter Mortensen
          Oct 7 '15 at 9:40




          2




          2




          nice explanation.... didnt get anything
          – Pentarex
          Aug 12 '16 at 13:02




          nice explanation.... didnt get anything
          – Pentarex
          Aug 12 '16 at 13:02




          1




          1




          Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
          – abe312
          Oct 11 '16 at 16:02






          Help will always be given at stackoverflow to those who ask for it ;) tell me which part did you not understand? I actually made a working application via my method after a bit of research. I was using visual studio 2013
          – abe312
          Oct 11 '16 at 16:02






          1




          1




          I don't see anything called "Publish" in VS2015
          – DaveInCaz
          Sep 1 '17 at 13:17




          I don't see anything called "Publish" in VS2015
          – DaveInCaz
          Sep 1 '17 at 13:17




          1




          1




          Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
          – Peter Mortensen
          Oct 29 '17 at 17:19






          Both Visual Studio 2008 and Visual Studio 2017 have the "Publish <project name>" in the "Build" menu (perhaps it was left out in Studio 2015?). In any case, it can also be done from the project properties, "Publish" → "Publish Now" (as in the screenshot here).
          – Peter Mortensen
          Oct 29 '17 at 17:19




















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f16946173%2fbest-way-to-deploy-visual-studio-application-that-can-run-without-installing%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

          Berounka

          Sphinx de Gizeh

          Different font size/position of beamer's navigation symbols template's content depending on regular/plain...