Skip to content

Commit

Permalink
Merge pull request #2486 from nycdotnet/patch-1
Browse files Browse the repository at this point in the history
Clarify that `#r` can reference system assemblies
  • Loading branch information
AbhitejJohn authored Dec 19, 2022
2 parents 5c99d47 + 0abf0f8 commit 0ccc796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/magic-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following magic commands are available within a C# language context.
| Command | Behavior
|-----------------------------------------|----------------------------------------------------------------------
| `#i` | Adds a NuGet source to the session. Subsequent `#r nuget` commands will include the specified source when resolving packages.
| `#r` | In C# Interactive, the `#r` directive adds a reference to a specified assembly, e.g. `#r "/path/to/a.dll"`. In .NET Interactive, this capability has been expanded to provide the ability to reference NuGet packages.<br />![image](https://user-images.githubusercontent.com/547415/81502691-362dae80-9294-11ea-94a4-266f4edc0d5e.png)<br />You cannot reference two different versions of the same package. If you try to do so, you'll receive an error:<br />![image](https://user-images.githubusercontent.com/547415/81502694-3cbc2600-9294-11ea-92d4-9151ad1bc805.png)
| `#r` | In C# Interactive, the `#r` directive adds a reference to a specified assembly, e.g. `#r "/path/to/a.dll"`, or system assembly, e.g. `#r "System.Net.Http.Json.dll"`. In .NET Interactive, this capability has been expanded to provide the ability to reference NuGet packages.<br />![image](https://user-images.githubusercontent.com/547415/81502691-362dae80-9294-11ea-94a4-266f4edc0d5e.png)<br />You cannot reference two different versions of the same package. If you try to do so, you'll receive an error:<br />![image](https://user-images.githubusercontent.com/547415/81502694-3cbc2600-9294-11ea-92d4-9151ad1bc805.png)
| `#!share` | Shares a variable from another specified subkernel (including one stored using `#!value`).
| `#!who` | Displays the names of the top-level variables within the C# subkernel.
| `#!whos` | Displays the top-level variables within the C# subkernel, including their name, type, and value.<br />![image](https://user-images.githubusercontent.com/547415/81481511-87329980-91e5-11ea-9a4b-b025435553ff.png)
Expand All @@ -59,4 +59,4 @@ The following magic commands are available within an F# language context.

## Extensibility

Magic commands can be added dynamically to .NET Interactive's kernels, either at the global level or to individual language-specific subkernels. You can learn more about how to do this [here](extending-dotnet-interactive.md#adding-magic-commands).
Magic commands can be added dynamically to .NET Interactive's kernels, either at the global level or to individual language-specific subkernels. You can learn more about how to do this [here](extending-dotnet-interactive.md#adding-magic-commands).

0 comments on commit 0ccc796

Please sign in to comment.