Skip to content
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

Update core/tutorials/libraries.md #1792

Merged
merged 7 commits into from
May 2, 2017
Merged

Update core/tutorials/libraries.md #1792

merged 7 commits into from
May 2, 2017

Conversation

cartermp
Copy link
Contributor

#1646

I got rid of the PCL section. We're moving people away from PCL. It's also such a problematic thing to use with the new tools that I think it does more harm than good documenting it. I still have to figure out how to reference a native library in the new tools.

"System.Net"
}
}
return $"dotnetfoundation.orgmentions .NET {dotNetCount} times in its HTML!";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space in the output ".orgmentions"

```

Each of these contain the `.dll` files for each target.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should cover dotnet publish and how that creates delivery packages for each of the target platforms. Should that be in this document, or another topic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I'm not sure if publish is valid for libraries over pack. @dsplaisted, would you know?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we may not want this anymore. I don't think dotnet publish is intended to be used for library development.

@BillWagner
Copy link
Member

BillWagner commented Mar 27, 2017

@cartermp Overall this looks good. I like the overall direction, and the example of building for multiple target frameworks. I left a couple suggestions on what's there so far. Ping when it's ready for a formal review and approval.

@cartermp
Copy link
Contributor Author

I think this is ready for a final review. @BillWagner @mairaw

@mairaw mairaw changed the title [WIP] Update core/tutorials/libraries.md Update core/tutorials/libraries.md Apr 27, 2017
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. I left one suggestion, but I'm fine merging it as is.

Also, you may want to update the date.

:shipit:

1. Setting `allowUnsafe` to `true` in a `buildOptions` section.
2. Specifying a [Runtime Identifier (RID)](../rid-catalog.md) in a `runtimes` section.
3. Specifying the path to the native `.dll` file(s) that you are referencing.
```bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider links to the dotnet commands near this example (https://github.com/dotnet/docs/tree/master/docs/core/tools), specifically dotnet new and dotnet sln

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

And that's it! You can now test your library across all platforms using command line tools. To continue testing now that you have everything set up, testing your library is very simple:

1. Make changes to your library.
2. Run tests from the command line, in your test directory, with `dotnet test` command.

Your code will be automatically rebuilt when you invoke `dotnet test` command.

Just remember to run `dotnet restore` from the command line any time you add a new dependency and you'll be good to go!

## How to use multiple projects
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this example. Well thought out

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@mairaw mairaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it looks great @cartermp! left a few comments for you to address before merging this.

@@ -14,9 +14,6 @@ ms.assetid: 9f6e8679-bd7e-4317-b3f9-7255a260d9cf

# Developing Libraries with Cross Platform Tools

> [!WARNING]
> This topic hasn't been updated to the latest version of the tooling yet.

This article covers how to write libraries for .NET using cross-platform CLI tools. The CLI provides an efficient and low-level experience that works across any supported OS. You can still build libraries with Visual Studio, and if that is your preferred experience [refer to the Visual Studio guide](libraries-with-vs.md).

## Prerequisites
Copy link
Contributor

@mairaw mairaw May 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 23 - since you've removed PCL from topic, you should remove it from the paragraph too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed!

@@ -96,106 +87,53 @@ If you want to reach the maximum number of developers and projects, use the .NET
.NET Framework 4.6.3 --> net463
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET Framework 4.6.3 should be .NET Framework 4.7

@cartermp cartermp merged commit e6286e6 into dotnet:master May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants