.NET/C#
  • ASP.NET Core Overview
  • ASP.NET Core API tutorial
    • How to create ASP.NET Core C# API tutorial
      • launchSettings
      • Install swagger
        • Swagger best practices
      • Run the app
      • Fix CORS problem
      • Add AutoMapper
      • Add JWT reference
      • Add .gitignore
      • Basic structure & EF Core
      • AddSingleton
    • Loading Related Entities
  • Unit test controller logic in ASP.NET Core
    • Unit testing controllers
  • .NET Q&A
    • dotnet try
    • LINQ
      • LINQ Query Syntax
      • Lambda Expression
      • Standard Query Operators
  • .NET C# Interview questions
    • C# - .NET interview questions and answers [Part 1]
    • C# - .NET interview questions and answers [Part 2]
    • C# Interview questions [Part 3] General questions
  • C#
    • Object-Oriented Programming (Principles)
      • N-tier architecture style
      • Command and Query Responsibility Segregation (CQRS) pattern
      • Project architecture
    • C# Advanced review
      • Implicit typing
      • Generics
      • Attributes
      • Reflection
      • Delegates
      • Anonymous Methods and Lambda Expressions
      • Events
      • Ref vs Out
      • Task
        • TaskFactory Class
  • MySQL
    • MySQL Lerning
      • SELECT
      • ORDER BY
      • WHERE
      • DISTINCT
      • IN
      • BETWEEN
      • Join
      • INNER JOIN
      • LEFT JOIN
      • RIGHT JOIN
      • GROUP BY
      • Subquery
      • UNION
    • Stored Procedures
      • CREATE PROCEDURE
  • Versioning API, MongoDB and ci-cd
    • Create a web API with ASP.NET Core and MongoDB
    • REST API versioning with ASP.NET Core
    • Design a CI/CD pipeline using Azure DevOps
      • Create a CI/CD pipeline for GitHub repo using Azure DevOps Starter
  • TFS & TFCV
    • What is Team Foundation Version Control
      • Develop and share your code in TFVC using Visual Studio
      • Suspend your work and manage your shelvesets
    • Newtonsoft Json.NET
      • Serializing and Deserializing JSON
  • MS-SQL
    • Quick tutorial
      • Add new column to a table
      • LEFT/RIGHT Reverse operator
      • Dates (Transact-SQL)
      • CAST and CONVERT (Transact-SQL)
      • Types of JOIN
      • Our first Left Outer Join
      • CROSS JOIN
Powered by GitBook
On this page
  • Getting started with dotnet try
  • Setup
  • Installing preview builds from master
  • Getting Started

Was this helpful?

  1. .NET Q&A

dotnet try

Runnable .NET code on your site

PreviousUnit testing controllersNextLINQ

Last updated 4 years ago

Was this helpful?

Getting started with dotnet try

Setup

Before you get can started creating interactive documentation, you will need to install the following:

  • The

  • The

  • The global tool

Updating to the latest version of the tool is easy. Run the following command:

> dotnet tool update -g Microsoft.dotnet-try

Installing preview builds from master

To install the latest preview build from master, first uninstall the existing version of the tool:

> dotnet tool uninstall -g Microsoft.dotnet-try

Then, install from the preview package feed:

> dotnet tool install -g --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" Microsoft.dotnet-try

Getting Started

You can get started using either one of the options below.

Option1: dotnet try demo

  • Create a new folder.

  • cd to your new folder.

  • Run command dotnet try demo : This will load our interactive dotnet try getting started tutorial.

The tutorials below work you through the following:

  • Creating a new Try .NET project.

  • Display interactive snippets using C# regions.

  • Creating Sessions

  • Verifying your projects: dotnet try verify a compiler for your documentation.

  • Passing Arguments

  • Using read only snippets

Option 2: Starting from scratch.

  1. Go to the terminal and create a folder called mydoc.

  2. cd to the mydoc folder and create a new console app with the following command:

> dotnet new console -o myApp

This will create a console app with the files myApp.csproj and Program.cs.

  1. Open the mydoc folder in Visual Studio Code.

  2. Create a file called doc.md. Inside that file, add some text and a code fence:

# My Interactive Document:

```cs --source-file ./myApp/Program.cs --project ./myApp/myApp.csproj
```
  1. Now, navigate to the mydoc folder in your console and run the following command:

     > dotnet try

You have created your first C# interactive developer experience. You should now be able to run your console app and see the result in the browser.

Option 3: Explore our .

Clone the repo.

Follow the quick steps listed to get started.

Return to

Advanced c# LINQ tutorials.

.NET Core 3.0 SDK
.NET Core 2.1 SDK
dotnet try
samples repo
dotnet/try-samples
here
README.md
https://www.youtube.com/playlist?list=PLMYKxbaJxSpHvrqzf-GqdCu7o4HaW3qlV
GitHub - dotnet/try-samplesGitHub
Logo