{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/core-docs/pulls/comments/67987448","id":67987448,"diff_hunk":"@@ -1,16 +1,381 @@\n-# 🔧 Development using Visual Studio Code\n-\n-> **Note**\n-> \n-> This topic hasn’t been written yet! \n->\n-> We welcome your input to help shape the scope and approach. You can\n-> track the status and provide input on this\n-> [issue](https://github.com/dotnet/core-docs/issues/282) at GitHub.\n-> \n-> If you would like to review early drafts and outlines of this\n-> topic, please leave a note with your contact information in the issue.\n->\n-> Learn more about how you can contribute on\n-> [GitHub](https://github.com/dotnet/core-docs/blob/master/CONTRIBUTING.md).\n->\n+# Development using Visual Studio Code\n+\n+by [Bertrand Le Roy](https://github.com/bleroy),  [Phillip Carter](https://github.com/cartermp),\n+[Bill Wagner](https://github.com/billwagner)\n+\n+Contributions by [Toni Solarin-Sodara](https://github.com/tsolarin)\n+\n+This document provides a tour of the steps and workflow to create a .NET\n+Core Solution using [Visual Studio Code](http://codde.visualstudio.com).\n+You'll learn how to create projects, create unit tests, use the debugging\n+tools, and incorproate third-party libraries via [NuGet](http://nuget.org).\n+\n+This article uses Visual Studio Code on Mac OS. Where there are differences,\n+it points out the differences for the Windows platform.\n+\n+Prerequisites\n+-------------\n+\n+Before starting, you'll need to install the [.NET Core SDK](https://www.microsoft.com/net/download),\n+currently in a preview relese. The .NET Core SDK includes the latest release\n+of the .NET Core framework and runtime.\n+\n+You'll also need to install [Visual Studio Code](http://code.visualstudio.com).\n+During the course of this article, you'll also install extensions\n+that will improve the .NET Core development experience.\n+\n+You can find the links to all of these at the [.NET home page](http://dot.net).\n+\n+Getting Started\n+---------------\n+\n+The source for this tutorial is available on\n+[GitHub](https://github.com/dotnet/core-docs/tree/master/samples/getting-started/golden).\n+\n+Start Visual Studio Code. Press Ctrl + '`' (the back-quote character) to open\n+an embedded terminal in VS Code. (Alternatively, you can use a separate\n+terminal window, if you prefer).\n+\n+By the time we're done, you'll create three projects: a library project,\n+tests for that library project, and a console application that makes\n+use of the library. You'll follow a standard folder structure for\n+the three projects. Following this standard folder structure\n+maeans that the .NET Core SDK tools understand the relationship between\n+your production code projects and your test code projects. That makes\n+your development exerience more productive.\n+\n+Let's start by creating those folders. In the terminal, create a 'golden'\n+directory. Under that directory create `src` and `test`\n+directories. Under `src` create `app` and `library` directories. In `test`\n+create a `test-library` directory. You can do this either using the terminal\n+in VS code, or by clicking on the parent folder in VS Code and selecting the\n+\"New Folder\" icon.\n+\n+In VS Code, open the 'golden' directory. This directory is the root of your solution.\n+\n+Next, create a `global.json` file in the root directory for your solution.\n+The contents of `global.json` are:\n+\n+```js\n+{\n+    projects: [\n+        \"src\",\n+        \"test\"\n+    ]\n+}\n+```\n+\n+At this point, your directory tree should look like this:\n+\n+\n+```\n+/golden\n+|__global.json\n+|__/src\n+   |__/app\n+   |__/library\n+/test\n+   |__/test-library\n+```\n+\n+### Writing the library\n+\n+Your next task is to create the library. In the terminal window\n+(either the embedded terminal in VS code, or another terminal),\n+cd to `golden/src/library` and type the command `dotnet new`.\n+\n+The `dotnet new` command creates a new application project. Because\n+you want a library project, you're going to make a few changes to\n+the generated `project.json` file.\n+\n+First, remote the `buildOptions` node:\n+\n+```js\n+\"buildOptions\" {\n+    \"emitEntryPoint\": true\n+}\n+```\n+\n+Next, you'll need to update the dependencies section to create\n+a library assembly, rather than an appliction. You'll remove the\n+`Microsoft.NETCore.App` node:\n+\n+```js\n+\"dependencies\": {\n+    \"Microsoft.NETCore.App\": {\n+        \"type\": \"platform\",\n+        \"version\": \"1.0.0-rc2-300702\"\n+    }\n+}\n+```\n+And replace it with a reference to the .NET Standard library:\n+\n+```js\n+\"dependencies\": {\n+    \"NETStandard.Library\": \"1.5.0-rc2-24027\"\n+}\n+```\n+\n+You'll also need to update the frameworks section to use \n+.NET Standards instead of `netcoreapp1.0`:\n+\n+```js\n+\"frameworks\": {\n+    \"netcoreapp1.0\" : {\n+        \"imports\": \"dnxcore50\"\n+    }\n+}\n+```\n+\n+becomes:\n+\n+```js\n+\"frameworks\" : {\n+    \"netstandard1.5\": {\n+        \"imports\": \"dnxcore50\"\n+}\n+```\n+\n+This library will make use of JSON representation of objects, so you'll want to\n+add a reference to the `Newtonsoft.Json` NuGet package. In`project.json`\n+add the latest pre-release version of the package as a dependency:\n+\n+```js\n+\"depdendencies\": {\n+    \"NETStandard.Library\": {\n+        \"version\": \"1.5.0-rc2-24027\"\n+    },\n+    \"Newtonsoft.Json\": \"9.0.1-beta1\"\n+}\n+```\n+\n+After you've finished adding those dependencies, you need to install those\n+packages into workspace. The `dotnet restore` command updates all dependencies,\n+and writes a `project.lock.json` file in the project directory. This\n+file contains the full dependency tree of all the dependencies in your\n+project. You don't need to read this file, its used by tools in the .NET\n+Core SDK.\n+\n+Now, let's update the C# code. Let's create a `Thing` class that contains\n+one public method. This method will return the sum of two numbers,\n+but  will do so by converting that number to a JSON string, and then\n+deserializing it. Rename the file `Program.cs` to `Thing.cs`. Then, replace\n+the existing code (for the template-generated Hello World) with the following:\n+\n+```cs\n+using static Newtonsoft.Json.JsonConvert;\n+\n+namespace Library\n+{\n+    public class Thing\n+    {\n+        public int Get(int left, int right) =>\n+            DeserializeObject<int>($\"{left + right}\");\n+    }\n+}\n+```\n+\n+This makes use of a number of modern C# features that you can learn","path":"docs/getting-started/devenv/using-visual-studio-code.md","position":194,"original_position":194,"commit_id":"e9daa15742ce6f3726db05318c5b9779eb61b6bc","original_commit_id":"e9daa15742ce6f3726db05318c5b9779eb61b6bc","user":{"login":"BillWagner","id":493969,"avatar_url":"https://avatars.githubusercontent.com/u/493969?v=3","gravatar_id":"","url":"https://api.github.com/users/BillWagner","html_url":"https://github.com/BillWagner","followers_url":"https://api.github.com/users/BillWagner/followers","following_url":"https://api.github.com/users/BillWagner/following{/other_user}","gists_url":"https://api.github.com/users/BillWagner/gists{/gist_id}","starred_url":"https://api.github.com/users/BillWagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BillWagner/subscriptions","organizations_url":"https://api.github.com/users/BillWagner/orgs","repos_url":"https://api.github.com/users/BillWagner/repos","events_url":"https://api.github.com/users/BillWagner/events{/privacy}","received_events_url":"https://api.github.com/users/BillWagner/received_events","type":"User","site_admin":false},"body":"Agreed. I added a brief list, but the articles haven't been written yet. ","created_at":"2016-06-22T02:51:43Z","updated_at":"2016-06-22T02:51:43Z","html_url":"https://github.com/dotnet/core-docs/pull/558#discussion_r67987448","pull_request_url":"https://api.github.com/repos/dotnet/core-docs/pulls/558","_links":{"self":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/comments/67987448"},"html":{"href":"https://github.com/dotnet/core-docs/pull/558#discussion_r67987448"},"pull_request":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/558"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/core-docs/pulls/558","id":74444004,"html_url":"https://github.com/dotnet/core-docs/pull/558","diff_url":"https://github.com/dotnet/core-docs/pull/558.diff","patch_url":"https://github.com/dotnet/core-docs/pull/558.patch","issue_url":"https://api.github.com/repos/dotnet/core-docs/issues/558","number":558,"state":"open","locked":false,"title":"Vs code golden path","user":{"login":"BillWagner","id":493969,"avatar_url":"https://avatars.githubusercontent.com/u/493969?v=3","gravatar_id":"","url":"https://api.github.com/users/BillWagner","html_url":"https://github.com/BillWagner","followers_url":"https://api.github.com/users/BillWagner/followers","following_url":"https://api.github.com/users/BillWagner/following{/other_user}","gists_url":"https://api.github.com/users/BillWagner/gists{/gist_id}","starred_url":"https://api.github.com/users/BillWagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BillWagner/subscriptions","organizations_url":"https://api.github.com/users/BillWagner/orgs","repos_url":"https://api.github.com/users/BillWagner/repos","events_url":"https://api.github.com/users/BillWagner/events{/privacy}","received_events_url":"https://api.github.com/users/BillWagner/received_events","type":"User","site_admin":false},"body":"Fixes #282.\r\n\r\nPulled in content from @tsolarin and @cqcallaw\r\n\r\nGetting started with VS Code.\r\n","created_at":"2016-06-20T13:35:11Z","updated_at":"2016-06-22T02:51:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14cb76701a9fe6894ab41678e2a860ea122d68f0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/core-docs/pulls/558/commits","review_comments_url":"https://api.github.com/repos/dotnet/core-docs/pulls/558/comments","review_comment_url":"https://api.github.com/repos/dotnet/core-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/core-docs/issues/558/comments","statuses_url":"https://api.github.com/repos/dotnet/core-docs/statuses/e9daa15742ce6f3726db05318c5b9779eb61b6bc","head":{"label":"BillWagner:vs-code-golden-path","ref":"vs-code-golden-path","sha":"e9daa15742ce6f3726db05318c5b9779eb61b6bc","user":{"login":"BillWagner","id":493969,"avatar_url":"https://avatars.githubusercontent.com/u/493969?v=3","gravatar_id":"","url":"https://api.github.com/users/BillWagner","html_url":"https://github.com/BillWagner","followers_url":"https://api.github.com/users/BillWagner/followers","following_url":"https://api.github.com/users/BillWagner/following{/other_user}","gists_url":"https://api.github.com/users/BillWagner/gists{/gist_id}","starred_url":"https://api.github.com/users/BillWagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BillWagner/subscriptions","organizations_url":"https://api.github.com/users/BillWagner/orgs","repos_url":"https://api.github.com/users/BillWagner/repos","events_url":"https://api.github.com/users/BillWagner/events{/privacy}","received_events_url":"https://api.github.com/users/BillWagner/received_events","type":"User","site_admin":false},"repo":{"id":45638874,"name":"core-docs","full_name":"BillWagner/core-docs","owner":{"login":"BillWagner","id":493969,"avatar_url":"https://avatars.githubusercontent.com/u/493969?v=3","gravatar_id":"","url":"https://api.github.com/users/BillWagner","html_url":"https://github.com/BillWagner","followers_url":"https://api.github.com/users/BillWagner/followers","following_url":"https://api.github.com/users/BillWagner/following{/other_user}","gists_url":"https://api.github.com/users/BillWagner/gists{/gist_id}","starred_url":"https://api.github.com/users/BillWagner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BillWagner/subscriptions","organizations_url":"https://api.github.com/users/BillWagner/orgs","repos_url":"https://api.github.com/users/BillWagner/repos","events_url":"https://api.github.com/users/BillWagner/events{/privacy}","received_events_url":"https://api.github.com/users/BillWagner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BillWagner/core-docs","description":".NET Core documentation (work in progress).","fork":true,"url":"https://api.github.com/repos/BillWagner/core-docs","forks_url":"https://api.github.com/repos/BillWagner/core-docs/forks","keys_url":"https://api.github.com/repos/BillWagner/core-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BillWagner/core-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BillWagner/core-docs/teams","hooks_url":"https://api.github.com/repos/BillWagner/core-docs/hooks","issue_events_url":"https://api.github.com/repos/BillWagner/core-docs/issues/events{/number}","events_url":"https://api.github.com/repos/BillWagner/core-docs/events","assignees_url":"https://api.github.com/repos/BillWagner/core-docs/assignees{/user}","branches_url":"https://api.github.com/repos/BillWagner/core-docs/branches{/branch}","tags_url":"https://api.github.com/repos/BillWagner/core-docs/tags","blobs_url":"https://api.github.com/repos/BillWagner/core-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BillWagner/core-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BillWagner/core-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/BillWagner/core-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BillWagner/core-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/BillWagner/core-docs/languages","stargazers_url":"https://api.github.com/repos/BillWagner/core-docs/stargazers","contributors_url":"https://api.github.com/repos/BillWagner/core-docs/contributors","subscribers_url":"https://api.github.com/repos/BillWagner/core-docs/subscribers","subscription_url":"https://api.github.com/repos/BillWagner/core-docs/subscription","commits_url":"https://api.github.com/repos/BillWagner/core-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/BillWagner/core-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/BillWagner/core-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/BillWagner/core-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/BillWagner/core-docs/contents/{+path}","compare_url":"https://api.github.com/repos/BillWagner/core-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BillWagner/core-docs/merges","archive_url":"https://api.github.com/repos/BillWagner/core-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BillWagner/core-docs/downloads","issues_url":"https://api.github.com/repos/BillWagner/core-docs/issues{/number}","pulls_url":"https://api.github.com/repos/BillWagner/core-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/BillWagner/core-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/BillWagner/core-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BillWagner/core-docs/labels{/name}","releases_url":"https://api.github.com/repos/BillWagner/core-docs/releases{/id}","deployments_url":"https://api.github.com/repos/BillWagner/core-docs/deployments","created_at":"2015-11-05T20:57:32Z","updated_at":"2016-06-20T14:57:58Z","pushed_at":"2016-06-20T22:17:09Z","git_url":"git://github.com/BillWagner/core-docs.git","ssh_url":"git@github.com:BillWagner/core-docs.git","clone_url":"https://github.com/BillWagner/core-docs.git","svn_url":"https://github.com/BillWagner/core-docs","homepage":"http://dotnet.readthedocs.org","size":11160,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"5a1e5f0e3c3de6379cde47d77059f01bcda226b8","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":35890081,"name":"core-docs","full_name":"dotnet/core-docs","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/core-docs","description":".NET Core documentation (work in progress).","fork":false,"url":"https://api.github.com/repos/dotnet/core-docs","forks_url":"https://api.github.com/repos/dotnet/core-docs/forks","keys_url":"https://api.github.com/repos/dotnet/core-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/core-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/core-docs/teams","hooks_url":"https://api.github.com/repos/dotnet/core-docs/hooks","issue_events_url":"https://api.github.com/repos/dotnet/core-docs/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/core-docs/events","assignees_url":"https://api.github.com/repos/dotnet/core-docs/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/core-docs/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/core-docs/tags","blobs_url":"https://api.github.com/repos/dotnet/core-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/core-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/core-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/core-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/core-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/core-docs/languages","stargazers_url":"https://api.github.com/repos/dotnet/core-docs/stargazers","contributors_url":"https://api.github.com/repos/dotnet/core-docs/contributors","subscribers_url":"https://api.github.com/repos/dotnet/core-docs/subscribers","subscription_url":"https://api.github.com/repos/dotnet/core-docs/subscription","commits_url":"https://api.github.com/repos/dotnet/core-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/core-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/core-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/core-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/core-docs/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/core-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/core-docs/merges","archive_url":"https://api.github.com/repos/dotnet/core-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/core-docs/downloads","issues_url":"https://api.github.com/repos/dotnet/core-docs/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/core-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/core-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/core-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/core-docs/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/core-docs/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/core-docs/deployments","created_at":"2015-05-19T15:13:32Z","updated_at":"2016-06-21T05:10:59Z","pushed_at":"2016-06-22T00:32:02Z","git_url":"git://github.com/dotnet/core-docs.git","ssh_url":"git@github.com:dotnet/core-docs.git","clone_url":"https://github.com/dotnet/core-docs.git","svn_url":"https://github.com/dotnet/core-docs","homepage":"https://dotnet.github.io/docs/index.html","size":15804,"stargazers_count":111,"watchers_count":111,"language":"PowerShell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"open_issues_count":152,"forks":139,"open_issues":152,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/558"},"html":{"href":"https://github.com/dotnet/core-docs/pull/558"},"issue":{"href":"https://api.github.com/repos/dotnet/core-docs/issues/558"},"comments":{"href":"https://api.github.com/repos/dotnet/core-docs/issues/558/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/558/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/558/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/core-docs/statuses/e9daa15742ce6f3726db05318c5b9779eb61b6bc"}}}}
{"actor":{"display_login":"BillWagner"}}