try: Bug in dotnet try command ( red area when executing code )

Describe the bug

I’m trying to execute dotnet try to try code samples of this repo but when I’m try run the code, I got this red area without any message.

What can I do in this case???

I really need help to fix this problem because I’m following a Linkedin course that use this tool .

dotnet --version 5.0.203

dotnet --list-sdks 2.1.524 [C:\Program Files\dotnet\sdk] 2.1.700-preview-009618 [C:\Program Files\dotnet\sdk] 3.1.200 [C:\Program Files\dotnet\sdk] 3.1.409 [C:\Program Files\dotnet\sdk] 5.0.203 [C:\Program Files\dotnet\sdk]

dotnet --info SDK .NET (reflétant tous les fichiers global.json) : Version: 5.0.203 Commit: 38xxxx Environnement d’exécution : OS Name: Windows OS Version: 10.0 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\5.0.203\

Host (useful for support): Version: 5.0.6 Commit: 478b2f8c0e

.NET SDKs installed: 2.1.524 [C:\Program Files\dotnet\sdk] 2.1.700-preview-009618 [C:\Program Files\dotnet\sdk] 3.1.200 [C:\Program Files\dotnet\sdk] 3.1.409 [C:\Program Files\dotnet\sdk] 5.0.203 [C:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.All 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Did this error occur while using dotnet try or online?

  • dotnet-try
  • online

What kind of error was it?

  • User Interface (UI): For example the output never displayed
  • Service Error: For example “The service is temporarily unavailable. We are working on it”
  • Other:

Screenshots

image

Please complete the following:

  • OS
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Safari

Update: I saw that the problem come from Kaspersky Antivirus, so when I disable the antivirus, the error is gone. But this is not a good solution , I would like to know how can I add an except for the localhost??

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 3
  • Comments: 17 (1 by maintainers)

Most upvoted comments

global.json can be used to fix the log version error.

I used the following steps to fix the “Unsupported log format error”:

  1. Install preview version of dotnet try (source: https://github.com/dotnet/try/blob/main/DotNetTryLocal.md)
dotnet tool install -g --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" Microsoft.dotnet-try
  1. Clone sample repo
git clone https://github.com/dotnet/try-samples.git
cd try-samples
  1. Create global.json inside the try-samples folder
touch global.json
  1. Place the following contents in global.json in the try-samples folder. Use the latest .NET 3.1 that you have installed (dotnet --list-sdks)
{
  "sdk": {
    "version": "3.1.416"
  }
}
  1. Run dotnet try in the try-samples folder:
dotnet try

The internal server errors should be fixed. Run dotnet try verify if any other error occurs.

Yup, this looks like it’s due to a change in the log format for MSBuild. We’ll look into whether we can support multiple versions and/or roll forward to .NET 5.

@MaartenGDev It worked! Thank you. I did have to restart my brower before it worked, probably because I’ve had it open a week.