question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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??

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
MaartenGDevcommented, Jan 30, 2022

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.

4reactions
jonsequiturcommented, Jun 8, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio compiles fine, but it still shows red lines
Surprisingly, the code compiles all fine. I have made following observations that are not normal at all. Red underlines in the code; While...
Read more >
Fix program errors and improve code - Visual Studio (Windows)
Inspect your code at run-time​​ You can use several step commands to execute code in the debugger. If the marked code is a...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
Bug :1523 - "[IDEA] Offload work by distributing trivial ebuild maintenance to ... Bug:279027 - "<=kde-base/kdelibs-{3.5.10,4.2.4} Remote code execution ...
Read more >
Debugging in Visual Studio Code
The top-level Run menu has the most common run and debug commands: ... Debug start view or press F5 and VS Code will...
Read more >
8.6 Release Notes Red Hat Enterprise Linux 8
The lsvpd package has been rebased to version 1.7.13. Notable bug fixes and enhancements include: Added support for SCSI location code. Fixed length...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found