-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
docs/core/tutorials/libraries.md
Outdated
"System.Net" | ||
} | ||
} | ||
return $"dotnetfoundation.orgmentions .NET {dotNetCount} times in its HTML!"; |
There was a problem hiding this comment.
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"
docs/core/tutorials/libraries.md
Outdated
``` | ||
|
||
Each of these contain the `.dll` files for each target. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
@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. |
I think this is ready for a final review. @BillWagner @mairaw |
There was a problem hiding this 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.
docs/core/tutorials/libraries.md
Outdated
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed!
docs/core/tutorials/libraries.md
Outdated
@@ -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 |
There was a problem hiding this comment.
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
#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.