{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/core-docs/pulls/comments/48094979","id":48094979,"diff_hunk":"@@ -0,0 +1,660 @@\n+# Writing Libraries with Cross Platform Tools\n+\n+By [Phillip Carter](https://github.com/cartermp)\n+\n+**Some details are subject to change as the toolchain evolves.**\n+\n+Targeting .NET Core for libraries can be done a number of ways, depending on the platform(s) you wish to support.  Sometimes Visual Studio is not available or a preferred development option.  .NET Core has a set of command line tools you can use instead of Visual Studio.\n+\n+* [Prerequisities](#prerequisites)\n+* [How to target .NET Core](#how-to-target-net-core)\n+* [How to target .NET Framework](#how-to-target-net-framework)\n+* [How to target a Portable Class Library (PCL)](#how to target a portable class-library-pcl)\n+* [How to cross-compile for .NET Core and .NET Framework](#how-to-cross-compile-for-net-core-and-net-framework)\n+* [How to test libraries on .NET Core](#how-to-test-libraries-on-net-core)\n+* [How to create a NuGet Package with your Library](#how-to-create-a-nuget-package-with-your-library)\n+\n+## Prerequisites\n+\n+You must have .NET Core installed on your machine.  This guide will focus on command line tooling because they work cross-platform and are what Visual Studio uses internally.  You have two options:\n+\n+* [DNX](http://aspnet.readthedocs.org/en/latest/getting-started/index.html), which has shipped with Visual Studio 2015 Update 1\n+\n+* [.NET CLI](http://dotnet.github.io/getting-started/), the tooling which will eventually replace DNX\n+\n+Either toolchain can be used to build and publish libraries today.\n+\n+The sections of this document dealing with older frameworks or Portable Class Libraries (PCLs) need the .NET Framework installed.  This is only supported on Windows.  \n+\n+The best way to install the .NET Framework is to [install Visual Studio](https://www.visualstudio.com/en-us/visual-studio-homepage-vs.aspx).  Alternatively, you can [install .NET Framework 4.6](https://www.microsoft.com/en-us/download/details.aspx?id=48130) as a standalone package.  This will allow you to target .NET Framework versions all the way down to .NET Framework 4.0.\n+\n+If you wish to support .NET Framework 2.0 or 3.5, you'll need to also [install .NET Framework 3.5](https://msdn.microsoft.com/en-us/library/hh506443(v=vs.110).  This will allow you to target .NET Framework versions all the way down to .NET Framework 2.0.","path":"docs/libraries/libraries-with-cli.md","position":31,"original_position":31,"commit_id":"a08f9899246584280ea71a1cf9914d6d1db3ce6a","original_commit_id":"a08f9899246584280ea71a1cf9914d6d1db3ce6a","user":{"login":"richlander","id":2608468,"avatar_url":"https://avatars.githubusercontent.com/u/2608468?v=3","gravatar_id":"","url":"https://api.github.com/users/richlander","html_url":"https://github.com/richlander","followers_url":"https://api.github.com/users/richlander/followers","following_url":"https://api.github.com/users/richlander/following{/other_user}","gists_url":"https://api.github.com/users/richlander/gists{/gist_id}","starred_url":"https://api.github.com/users/richlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richlander/subscriptions","organizations_url":"https://api.github.com/users/richlander/orgs","repos_url":"https://api.github.com/users/richlander/repos","events_url":"https://api.github.com/users/richlander/events{/privacy}","received_events_url":"https://api.github.com/users/richlander/received_events","type":"User","site_admin":false},"body":"The 3.5 link is broken (markdown-wise). I suspect you have a space in between the characters.","created_at":"2015-12-19T17:46:38Z","updated_at":"2015-12-19T17:46:38Z","html_url":"https://github.com/dotnet/core-docs/pull/182#discussion_r48094979","pull_request_url":"https://api.github.com/repos/dotnet/core-docs/pulls/182","_links":{"self":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/comments/48094979"},"html":{"href":"https://github.com/dotnet/core-docs/pull/182#discussion_r48094979"},"pull_request":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/182"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/core-docs/pulls/182","id":52467991,"html_url":"https://github.com/dotnet/core-docs/pull/182","diff_url":"https://github.com/dotnet/core-docs/pull/182.diff","patch_url":"https://github.com/dotnet/core-docs/pull/182.patch","issue_url":"https://api.github.com/repos/dotnet/core-docs/issues/182","number":182,"state":"open","locked":false,"title":"Add New Library Article for X-plat CLI Tooling","user":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"body":"This addresses part of #46.  Specifically, this covers different relevant\r\nscenarios for how to build new libraries on .NET Core, how to target\r\ndifferent versions of the platform (framework and core), how to target\r\nPCLs, how to test, and how to create a NuGet Package.\r\n\r\nFor the last section, creating a NuGet Package, this is not intended to\r\nreplace any content which will eventually go into the packaging section.\r\nIts goal is to show how you can package using the CLI tools.  There are\r\nmany other details related to NuGet which will be covered in the Packaging\r\nsection.\r\n\r\nMeta: Created a new PR from #110 because of the change to the TOC slightly changed the tone and purpose of this doc.  I also feel that, a few weird things aside (like getting links to sections working), it's pretty close to being a final draft.  It'll have to change as the tooling evolves, but people should be able to use this document today and start creating new libraries.\r\n\r\n/cc @richlander @bleroy @blackdwarf @BethMassi @Petermarcu @davidfowl ","created_at":"2015-12-02T23:03:29Z","updated_at":"2015-12-19T17:46:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7e578b9a48f12367c34cafd609d1b2c9d9c6c99","assignee":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/core-docs/pulls/182/commits","review_comments_url":"https://api.github.com/repos/dotnet/core-docs/pulls/182/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/182/comments","statuses_url":"https://api.github.com/repos/dotnet/core-docs/statuses/a08f9899246584280ea71a1cf9914d6d1db3ce6a","head":{"label":"cartermp:new-library-manual","ref":"new-library-manual","sha":"a08f9899246584280ea71a1cf9914d6d1db3ce6a","user":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"repo":{"id":44759105,"name":"core-docs","full_name":"cartermp/core-docs","owner":{"login":"cartermp","id":6309070,"avatar_url":"https://avatars.githubusercontent.com/u/6309070?v=3","gravatar_id":"","url":"https://api.github.com/users/cartermp","html_url":"https://github.com/cartermp","followers_url":"https://api.github.com/users/cartermp/followers","following_url":"https://api.github.com/users/cartermp/following{/other_user}","gists_url":"https://api.github.com/users/cartermp/gists{/gist_id}","starred_url":"https://api.github.com/users/cartermp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cartermp/subscriptions","organizations_url":"https://api.github.com/users/cartermp/orgs","repos_url":"https://api.github.com/users/cartermp/repos","events_url":"https://api.github.com/users/cartermp/events{/privacy}","received_events_url":"https://api.github.com/users/cartermp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cartermp/core-docs","description":".NET Core documentation (work in progress).","fork":true,"url":"https://api.github.com/repos/cartermp/core-docs","forks_url":"https://api.github.com/repos/cartermp/core-docs/forks","keys_url":"https://api.github.com/repos/cartermp/core-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cartermp/core-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cartermp/core-docs/teams","hooks_url":"https://api.github.com/repos/cartermp/core-docs/hooks","issue_events_url":"https://api.github.com/repos/cartermp/core-docs/issues/events{/number}","events_url":"https://api.github.com/repos/cartermp/core-docs/events","assignees_url":"https://api.github.com/repos/cartermp/core-docs/assignees{/user}","branches_url":"https://api.github.com/repos/cartermp/core-docs/branches{/branch}","tags_url":"https://api.github.com/repos/cartermp/core-docs/tags","blobs_url":"https://api.github.com/repos/cartermp/core-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cartermp/core-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cartermp/core-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/cartermp/core-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cartermp/core-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/cartermp/core-docs/languages","stargazers_url":"https://api.github.com/repos/cartermp/core-docs/stargazers","contributors_url":"https://api.github.com/repos/cartermp/core-docs/contributors","subscribers_url":"https://api.github.com/repos/cartermp/core-docs/subscribers","subscription_url":"https://api.github.com/repos/cartermp/core-docs/subscription","commits_url":"https://api.github.com/repos/cartermp/core-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/cartermp/core-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/cartermp/core-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/cartermp/core-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/cartermp/core-docs/contents/{+path}","compare_url":"https://api.github.com/repos/cartermp/core-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cartermp/core-docs/merges","archive_url":"https://api.github.com/repos/cartermp/core-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cartermp/core-docs/downloads","issues_url":"https://api.github.com/repos/cartermp/core-docs/issues{/number}","pulls_url":"https://api.github.com/repos/cartermp/core-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/cartermp/core-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/cartermp/core-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cartermp/core-docs/labels{/name}","releases_url":"https://api.github.com/repos/cartermp/core-docs/releases{/id}","created_at":"2015-10-22T16:41:05Z","updated_at":"2015-11-19T00:02:52Z","pushed_at":"2015-12-14T21:10:08Z","git_url":"git://github.com/cartermp/core-docs.git","ssh_url":"git@github.com:cartermp/core-docs.git","clone_url":"https://github.com/cartermp/core-docs.git","svn_url":"https://github.com/cartermp/core-docs","homepage":"http://dotnet.readthedocs.org","size":10101,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"dcc9e43d5c206e6ed915a75836913b6eeb61fcf2","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}","created_at":"2015-05-19T15:13:32Z","updated_at":"2015-12-19T05:18:07Z","pushed_at":"2015-12-14T21:10:08Z","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":"http://dotnet.github.io/docs/index.html","size":10120,"stargazers_count":38,"watchers_count":38,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":52,"forks":41,"open_issues":52,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/182"},"html":{"href":"https://github.com/dotnet/core-docs/pull/182"},"issue":{"href":"https://api.github.com/repos/dotnet/core-docs/issues/182"},"comments":{"href":"https://api.github.com/repos/dotnet/core-docs/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/core-docs/pulls/182/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/182/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/core-docs/statuses/a08f9899246584280ea71a1cf9914d6d1db3ce6a"}}}}