Skip to content

Corrected publishing warnings #1189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/csharp/getting-started/publishing-with-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ms.assetid: a19545d3-24af-4a32-9778-cfb5ae938287

# Publishing Your Hello World Application with Visual Studio 2015 #

Now that you've created your console app (in the [Building a Hello World Appllication with .NET Core in Visual Studio 2015](.\with-visual_studio.md) topic) and debugged it (in the [Debugging Your Hello World Application with Visual Studio 2015](.\debugging_with_visual_studio.md) topic), you can publish your application. This allows you to distribute your application and to run it outside of Visual Studio. To publish and run your application:
Now that you've created your console app (in the [Building a Hello World Appllication with .NET Core in Visual Studio 2015](.\with-visual-studio.md) topic) and debugged it (in the [Debugging Your Hello World Application with Visual Studio 2015](.\debugging-with-visual-studio.md) topic), you can publish your application. This allows you to distribute your application and to run it outside of Visual Studio. To publish and run your application:

1. Make sure that Visual Studio is building the release version of your application. If necessary, change change the build configuration setting on the toolbar from **Debug** to **Release**, as shown in the following figure.

Expand All @@ -25,7 +25,7 @@ Now that you've created your console app (in the [Building a Hello World Appllic

3. When the **Profile** tab of the **Publish** dialog box shown in the following figure appears, select the **File System** target.

![Image](.\media\oublish.jpg)
![Image](.\media\publish.jpg)

4. In the **New Custom Profile** dialog box, enter a profile name, such as `Hello World Release`.

Expand All @@ -39,7 +39,7 @@ Now that you've created your console app (in the [Building a Hello World Appllic

The project's .\bin\release\PublishOutput directory contains your published app. Because this application has no platform-specific dependencies (such as calls to a third-party library that is supported only on specific platforms, or calls to operating system APIs), it runs on any platform on which .NET Core has been installed.

You run the app with the [.NET Core Command Line Interface](..\tools\index.md) (CLI) by using the following command:
You run the app with the [.NET Core Command Line Interface](../../core/tools/index.md) (CLI) by using the following command:


```console
Expand All @@ -48,5 +48,5 @@ dotnet helloworld.dll

To distribute it, you can simply copy the files generated by the publishing operation to any computer that has .NET Core installed. Note that the output includes a symbol (.pdb) file that you do not have to distribute with your app.

For more information on publishing and deploying a .NET Core application, see [.NET Core Application Deployment](..\..\core\deploying\index.md).
For more information on publishing and deploying a .NET Core application, see [.NET Core Application Deployment](../../core/deploying/index.md).

16 changes: 8 additions & 8 deletions docs/csharp/getting-started/with-visual-studio.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In order to develop the application, Visual Studio 2015 must be installed on you

In addition, you must install the [.NET Core tools for Visual Studio 2015](https://go.microsoft.com/fwlink/?LinkID=827546).

For more information, see [Prerequisites for Windows development](../../core/windows-prerequisites).
For more information, see [Prerequisites for Windows development](../../core/windows-prerequisites.md).

## A simple "Hello World" application ##

Expand All @@ -33,38 +33,38 @@ Let's begin by creating a simple "Hello World" application. Here are the steps:

2. In the right-hand pane, select **Console Application (.NET Core)**. Enter the name of the project, `HelloWorld`, and make sure the **Create directory for solution** box is checked, as the following figure shows.

![Image](.\media\with-visual-studio\vs_newproject.jpg)
![Image](./media/vs_newproject.jpg)

You can also create two other .NET Core application types with Visual Studio.

3. Select the **OK** button. Visual Studio displays its development environment with its code window, as the following figure shows. The C# Console Application template for .NET Core automatically defines a class, `Program`, with a single method, `Main`. `Main` is the application entry point, the method that is called automatically by the runtime when it launches the application.

![Image](.\media\with-visual-studio\vs_devenv.jpg)
![Image](./media/vs_devenv.jpg)

4. Enter the following C# code in the code window immediately after the opening bracket that follows the `public static void Main(string[] args)` line.

[!CODE [GettingStarted#1](../../../samples/snippets/csharp/getting_started/with_visual_studio/helloworld.cs#1)]

The following figure shows the resulting code window.

![Image](.\media\with-visual-studio\codewindow.jpg)
![Image](./media/codewindow.jpg)

5. Compile the program by selecting **Build**, **Build Solution**. This compiles your program to IL, an intermediate language that is then converted to binary code by a just-in-time (JIT) compiler.

6. Run the program in debug mode in Visual Studio by selecting the green arrow on the toolbar, pressing F5, or selecting **Debug**, **Start Debugging**. After you respond to the prompts by entering a name and pressing the Enter key, the console window should look something like the following:

![Image](.\media\with-visual-studio\console.jpg)
![Image](./media/console.jpg)

7. Press any key to close the console window. This ends debug mode.

You've now created and run your simple application. To develop a professional application, there are still some additional steps that you can take to make your application ready for release:

- For information on debugging your application, see [Debugging the Hello World Application](.\Debugging_on_Visual_Studio.md)
- For information on debugging your application, see [Debugging the Hello World Application](.\debugging-with-visual-studio.md)

- For information on developing a publishing a distributable version of your application, see [Publishing the Hello World application](Publishing_on_Visual_Studio.md).
- For information on developing a publishing a distributable version of your application, see [Publishing the Hello World application](./publishing-with-visual-studio.md).

## Related topics ##

Instead of a console application, you can also build a class library with .NET Core and Visual Studio 2015. For a step-by-step introduction, see [Getting started with .NET Core on WIndows, using Visual Studio 2015](..\core\tutorials\using-on-windows.md).
Instead of a console application, you can also build a class library with .NET Core and Visual Studio 2015. For a step-by-step introduction, see [Getting started with .NET Core on WIndows, using Visual Studio 2015](../../core/tutorials/using-on-windows.md).

You can also develop a .NET Core console app on Mac, Linux, and Windows by using Visual Studio Code, a freely downloadable code editor. For a step-by-step tutorial, see [Getting Started with Visual Studio Code](.\with-visual-studio-code.md).