|
1 | 1 | ---
|
2 |
| -title: Publish your .NET Core Hello World application with Visual Studio 2017 |
| 2 | +title: Publish your .NET Core Hello World application with Visual Studio |
3 | 3 | description: Publishing creates the set of files that are needed to run your .NET Core application.
|
4 | 4 | author: BillWagner
|
5 | 5 | ms.author: wiwagn
|
6 |
| -ms.date: 10/05/2017 |
| 6 | +ms.date: 12/10/2019 |
7 | 7 | ms.custom: "vs-dotnet, seodec18"
|
8 | 8 | ---
|
9 |
| -# Publish your .NET Core Hello World application with Visual Studio 2017 |
| 9 | +# Publish your .NET Core Hello World application with Visual Studio 2019 |
10 | 10 |
|
11 |
| -In [Build a Hello World application with .NET Core in Visual Studio](with-visual-studio.md), you built a Hello World console application. In [Debug your Hello World application with Visual Studio](debugging-with-visual-studio.md), you tested it using the Visual Studio debugger. Now that you're sure that it works as expected, you can publish it so that other users can run it. Publishing creates the set of files that are needed to run your application, and you can deploy the files by copying them to a target machine. |
| 11 | +In [Create a Hello World application with .NET Core in Visual Studio](with-visual-studio.md), you built a Hello World console application. In [Debug your Hello World application with Visual Studio](debugging-with-visual-studio.md), you tested it using the Visual Studio debugger. Now that you're sure that it works as expected, you can publish it so that other users can run it. Publishing creates the set of files that are needed to run your application. To deploy the files, copy them to the target machine. |
12 | 12 |
|
13 |
| -To publish and run your application: |
| 13 | +## Publish the app |
14 | 14 |
|
15 | 15 | 1. Make sure that Visual Studio is building the Release version of your application. If necessary, change the build configuration setting on the toolbar from **Debug** to **Release**.
|
16 | 16 |
|
17 | 17 | 
|
18 | 18 |
|
19 |
| -1. Right-click on the **HelloWorld** project (not the HelloWorld solution) and select **Publish** from the menu. You can also select **Publish HelloWorld** from the main Visual Studio **Build** menu. |
| 19 | +1. Right-click on the **HelloWorld** project (not the HelloWorld solution) and select **Publish** from the menu. (You can also select **Publish HelloWorld** from the main **Build** menu.) |
20 | 20 |
|
21 | 21 | 
|
| 22 | + |
| 23 | +1. On the **Pick a publish target** page, select **Folder**, and then select **Create Profile**. |
22 | 24 |
|
23 |
| -  |
| 25 | +  |
| 26 | + |
| 27 | +1. On the **Publish** page, select **Publish**. |
24 | 28 |
|
25 |
| -1. Open a console window. For example in the **Type here to search** text box in the Windows taskbar, enter `Command Prompt` (or `cmd` for short), and open a console window by either selecting the **Command Prompt** desktop app or pressing Enter if it's selected in the search results. |
| 29 | +  |
| 30 | + |
| 31 | +## Inspect the files |
26 | 32 |
|
27 |
| -1. Navigate to the published application in the `bin\release\PublishOutput` subdirectory of your application's project directory. As the following figure shows, the published output includes the following four files: |
| 33 | +The publishing process creates a framework-dependent deployment, which is a type of deployment where the published application runs on any platform supported by .NET Core with .NET Core installed on the system. Users can run the published app by double-clicking the executable or issuing the `dotnet HelloWorld.dll` command from a command prompt. |
| 34 | + |
| 35 | +In the following steps, you'll look at the files created by the publish process. |
| 36 | + |
| 37 | +1. Open a command prompt. |
| 38 | + |
| 39 | + One way to open a command prompt is to enter **Command Prompt** (or **cmd** for short) in the search box on the Windows taskbar. Select the **Command Prompt** desktop app, or press **Enter** if it's already selected in the search results. |
| 40 | + |
| 41 | +1. Navigate to the published application in the *bin\Release\netcoreapp3.1\publish* subdirectory of the application's project directory. |
| 42 | + |
| 43 | +  |
| 44 | + |
| 45 | + As the image shows, the published output includes the following files: |
28 | 46 |
|
29 | 47 | * *HelloWorld.deps.json*
|
30 | 48 |
|
31 |
| - The application's runtime dependencies file. It defines the .NET Core components and the libraries (including the dynamic link library that contains your application) needed to run your application. For more information, see [Runtime Configuration Files](https://github.com/dotnet/cli/blob/85ca206d84633d658d7363894c4ea9d59e515c1a/Documentation/specs/runtime-configuration-file.md). |
| 49 | + This is the application's runtime dependencies file. It defines the .NET Core components and the libraries (including the dynamic link library that contains your application) needed to run the app. For more information, see [Runtime configuration files](https://github.com/dotnet/cli/blob/85ca206d84633d658d7363894c4ea9d59e515c1a/Documentation/specs/runtime-configuration-file.md). |
32 | 50 |
|
33 | 51 | * *HelloWorld.dll*
|
34 | 52 |
|
35 |
| - The file that contains your application. It is a dynamic link library that can be executed by entering the `dotnet HelloWorld.dll` command in a console window. |
| 53 | + This is the [framework-dependent deployment](../deploying/deploy-with-cli.md#framework-dependent-deployment) version of the application. To execute this dynamic link library, enter `dotnet HelloWorld.dll` at a command prompt. |
| 54 | + |
| 55 | + * *HelloWorld.exe* |
| 56 | + |
| 57 | + This is the [framework-dependent executable](../deploying/deploy-with-cli.md#framework-dependent-executable) version of the application. To run it, enter `HelloWorld.exe` at a command prompt. |
36 | 58 |
|
37 | 59 | * *HelloWorld.pdb* (optional for deployment)
|
38 | 60 |
|
39 |
| - A file that contains debug symbols. You aren't required to deploy this file along with your application, although you should save it in the event that you need to debug the published version of your application. |
| 61 | + This is the debug symbols file. You aren't required to deploy this file along with your application, although you should save it in the event that you need to debug the published version of your application. |
40 | 62 |
|
41 | 63 | * *HelloWorld.runtimeconfig.json*
|
42 | 64 |
|
43 |
| - The application's runtime configuration file. It identifies the version of .NET Core that your application was built to run on. For more information, see [Runtime Configuration Files](https://github.com/dotnet/cli/blob/85ca206d84633d658d7363894c4ea9d59e515c1a/Documentation/specs/runtime-configuration-file.md). |
44 |
| - |
45 |
| -  |
| 65 | + This is the application's runtime configuration file. It identifies the version of .NET Core that your application was built to run on. For more information, see [Runtime configuration files](https://github.com/dotnet/cli/blob/85ca206d84633d658d7363894c4ea9d59e515c1a/Documentation/specs/runtime-configuration-file.md). |
46 | 66 |
|
47 |
| -The publishing process creates a framework-dependent deployment, which is a type of deployment where the published application will run on any platform supported by .NET Core with .NET Core installed on the system. Users can run your application by issuing the `dotnet HelloWorld.dll` command from a console window. |
| 67 | +## Additional resources |
48 | 68 |
|
49 |
| -For more information on publishing and deploying .NET Core applications, see [.NET Core Application Deployment](../deploying/index.md). |
| 69 | +- [.NET Core application deployment](../deploying/index.md) |
0 commit comments