try icon indicating copy to clipboard operation
try copied to clipboard

The output section dosen´t show

Open HagenGuerrero opened this issue 3 years ago • 8 comments
trafficstars

Describe the bug

Please provide as much information as you can.

Did this error occur while using dotnet try or online?

  • [X] dotnet-try
  • [ ] online

What kind of error was it?

  • [X ] 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

If applicable, add screenshots to help explain your problem. image

Please complete the following:

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

HagenGuerrero avatar Nov 02 '22 23:11 HagenGuerrero

I got the same problem. dotnet try demo could not run

image

  • OS: Windows 10
  • Browser: Edge

Here's error from the Edge console

image

Kuuo avatar Nov 15 '22 09:11 Kuuo

same problem

Mesalina avatar Nov 25 '22 16:11 Mesalina

Same problem.

I try to run 101 LINQ Samples. It fails to pass dotnet try verify in the beginning and luckily I fix it by adding global.json in \try-samples-main\101-linq-samples. However, even though the verification is passed without any error, the code samples cannot output the expected computation results in the webpage's consoles, but only displays the red bar, completely same as Kuuo's and others' situation.

image

My Attempt:

  1. At first, I failed to run "dotnet try verify". It threw the exception:
--------------------------------------------------------------------------------
  Checking Markdown...
    ✓  Line 9:  E:\source\repos\DotnetTry\try-samples-main\101-linq-samples\src\AggregateOperators.cs (in project E:\source\repos\DotnetTry\try-samples-main\101-linq-samples\src\Try101LinqSamples.csproj)

  Compiling samples for region "sum-syntax"

Unhandled exception: System.InvalidOperationException: No design time or full build available
   at WorkspaceServer.Packaging.Package.CreateRoslynWorkspace() in D:\workspace\_work\1\s\WorkspaceServer\Packaging\Package.cs:line 372
   at WorkspaceServer.Packaging.Package.ProcessFullBuildRequest(Budget budget) in D:\workspace\_work\1\s\WorkspaceServer\Packaging\Package.cs:line 351
   at WorkspaceServer.Packaging.Package.<SetupWorkspaceCreationFromBuildChannel>b__54_0(Budget budget) in D:\workspace\_work\1\s\WorkspaceServer\Packaging\Package.cs:line 309
   at WorkspaceServer.Servers.Roslyn.PackageExtensions.GetCompilation(IPackage package, IReadOnlyCollection`1 sources, SourceCodeKind sourceCodeKind, IEnumerable`1 defaultUsings, Func`1 workspaceFactory, Budget budget) in D:\workspace\_work\1\s\WorkspaceServer\Servers\Roslyn\PackageExtensions.cs:line 186
   at WorkspaceServer.Servers.Roslyn.RoslynWorkspaceServer.CompileWorker(Workspace workspace, BufferId activeBufferId, Budget budget) in D:\workspace\_work\1\s\WorkspaceServer\Servers\Roslyn\RoslynWorkspaceServer.cs:line 415
   at WorkspaceServer.Servers.Roslyn.RoslynWorkspaceServer.Compile(WorkspaceRequest request, Budget budget) in D:\workspace\_work\1\s\WorkspaceServer\Servers\Roslyn\RoslynWorkspaceServer.cs:line 193
   at WorkspaceServer.Servers.WorkspaceServerMultiplexer.Compile(WorkspaceRequest request, Budget budget) in D:\workspace\_work\1\s\WorkspaceServer\Servers\WorkspaceServerMultiplexer.cs:line 26
   at MLS.Agent.CommandLine.VerifyCommand.Compile(Session session, MarkdownProcessingContext context) in D:\workspace\_work\1\s\MLS.Agent\CommandLine\VerifyCommand.cs:line 193
   at MLS.Agent.CommandLine.VerifyCommand.Do(VerifyOptions verifyOptions, IConsole console, StartupOptions startupOptions, MarkdownProcessingContext context) in D:\workspace\_work\1\s\MLS.Agent\CommandLine\VerifyCommand.cs:line 84
   at System.CommandLine.Invocation.CommandHandler.GetResultCodeAsync(Object value, InvocationContext context)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at MLS.Agent.CommandLine.CommandLineParser.<>c__DisplayClass7_0.<<Create>b__2>d.MoveNext() in D:\workspace\_work\1\s\MLS.Agent\CommandLine\CommandLineParser.cs:line 165
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass15_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass24_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__21_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__19_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass13_0.<<UseExceptionHandler>b__0>d.MoveNext()
  1. Then, I create the file global.json in \try-samples-main\101-linq-samples(In the beginning, I try to put the global.json in the \try-samples-main, but it does no help to the verification at all), written with
  {
      "sdk": {
        "version": "3.0.103"
      }
  }

This measure helps it pass the dotnet try verify. All samples are favorably compiled and tell me Found 0 error(s) as a consequence. My machine environment (by dotnet --info) is as below.

PS E:\source\repos\DotnetTry\try-samples-main\101-linq-samples\src> dotnet --info
.NET Core SDK(reflecting any global.json):
 Version:   3.0.103
 Commit:    b7ef045669

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22000
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.103\

Host:
  Version:      7.0.0
  Architecture: x64
  Commit:       d099f075e4

.NET SDKs installed:
  3.0.103 [C:\Program Files\dotnet\sdk]
  7.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  E:\source\repos\DotnetTry\try-samples-main\101-linq-samples\src\global.json

  1. Unfortunately, after passing the verification and typing dotnet try to run, a red bar is still displayed when I click to run any code sample in Chrome 107.0.5304.107 (Official Build) (64-bit).

swirling-wind avatar Nov 26 '22 07:11 swirling-wind

I just started diving into Linq, and I ran into this exact same issue. Is there any workaround until it gets fixed?

jasonfisherjlf avatar Jan 30 '23 23:01 jasonfisherjlf

I just started diving into Linq, and I ran into this exact same issue. Is there any workaround until it gets fixed?

Currently facing the same issue too. :(

aisyah388 avatar Feb 01 '23 08:02 aisyah388

I just started diving into Linq, and I ran into this exact same issue. Is there any workaround until it gets fixed?

Currently facing the same issue too. :(

Thankfully following this guide: https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/walkthrough-writing-queries-linq works well enough that you can copy-paste the 101-linq-samples into that small project and learn LINQ well enough.

Although I hope they still fix the issue with the 101-linq-samples eventually...

jasonfisherjlf avatar Feb 01 '23 10:02 jasonfisherjlf

I just started diving into Linq, and I ran into this exact same issue. Is there any workaround until it gets fixed?

Currently facing the same issue too. :(

Thankfully following this guide: https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/walkthrough-writing-queries-linq works well enough that you can copy-paste the 101-linq-samples into that small project and learn LINQ well enough.

Although I hope they still fix the issue with the 101-linq-samples eventually...

Thank you very much for your sharing, helps me a lot. Let's hope they will fix this issue soon...

aisyah388 avatar Feb 02 '23 01:02 aisyah388

I am facing this issue as well, not with the linq examples but just with running:

dotnet try demo

The server starts fine and I get the pages I am supposed to see. But the snippets provided there, also only output a red background and nothing else.

If I run verify on the demo application, I get all sorts of errors:

PS C:\Source\username\TryDotNet> dotnet try verify
Verifying...

C:\Source\username\TryDotNet\NewProject.md
-----------------------------------------

C:\Source\username\TryDotNet\PassingArgs.md
------------------------------------------
  Checking Markdown...
    ✓  Line 16: C:\Source\username\TryDotNet\Snippets\Program.cs (in project C:\Source\username\TryDotNet\Snippets\Snippets.csproj)

  Compiling samples for region "Main"

Unhandled exception: System.AggregateException: One or more errors occurred. (Unsupported log file format. Latest supported version is 9, the log file has version 15.)
 ---> System.NotSupportedException: Unsupported log file format. Latest supported version is 9, the log file has version 15.
   at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(Stream stream) in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 53
   at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(String sourceFilePath) in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 37
   at Buildalyzer.AnalyzerManager.Analyze(String binLogPath, IEnumerable`1 buildLoggers)
   at WorkspaceServer.Packaging.Package.LoadDesignTimeBuildFromBuildLogFile(Package package, FileSystemInfo binLog) in F:\workspace\_work\1\s\WorkspaceServer\Packaging\Package.cs:line 138
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at WorkspaceServer.Packaging.Package.TryLoadDesignTimeBuildFromBuildLog() in F:\workspace\_work\1\s\WorkspaceServer\Packaging\Package.cs:line 127
   at WorkspaceServer.Packaging.Package..ctor(String name, IPackageInitializer initializer, DirectoryInfo directory, IScheduler buildThrottleScheduler) in F:\workspace\_work\1\s\WorkspaceServer\Packaging\Package.cs:line 112
   at WorkspaceServer.Packaging.RebuildablePackage..ctor(String name, IPackageInitializer initializer, DirectoryInfo directory, IScheduler buildThrottleScheduler) in F:\workspace\_work\1\s\WorkspaceServer\Packaging\RebuildablePackage.cs:line 22
   at WorkspaceServer.Packaging.PackageBuilder.GetPackage(Budget budget) in F:\workspace\_work\1\s\WorkspaceServer\Packaging\PackageBuilder.cs:line 163
   at WorkspaceServer.PackageRegistry.<>c__DisplayClass10_0.<<GetPackageFromPackageBuilder>b__0>d.MoveNext() in F:\workspace\_work\1\s\WorkspaceServer\PackageRegistry.cs:line 139
--- End of stack trace from previous location where exception was thrown ---
   at WorkspaceServer.PackageRegistry.Get[T](String packageName, Budget budget) in F:\workspace\_work\1\s\WorkspaceServer\PackageRegistry.cs:line 92
   at WorkspaceServer.Servers.Roslyn.RoslynWorkspaceServer.CompileWorker(Workspace workspace, BufferId activeBufferId, Budget budget) in F:\workspace\_work\1\s\WorkspaceServer\Servers\Roslyn\RoslynWorkspaceServer.cs:line 412
   at WorkspaceServer.Servers.Roslyn.RoslynWorkspaceServer.Compile(WorkspaceRequest request, Budget budget) in F:\workspace\_work\1\s\WorkspaceServer\Servers\Roslyn\RoslynWorkspaceServer.cs:line 193
   at WorkspaceServer.Servers.WorkspaceServerMultiplexer.Compile(WorkspaceRequest request, Budget budget) in F:\workspace\_work\1\s\WorkspaceServer\Servers\WorkspaceServerMultiplexer.cs:line 26
   at MLS.Agent.CommandLine.VerifyCommand.Compile(Session session, MarkdownProcessingContext context) in F:\workspace\_work\1\s\MLS.Agent\CommandLine\VerifyCommand.cs:line 193
   at MLS.Agent.CommandLine.VerifyCommand.Do(VerifyOptions verifyOptions, IConsole console, StartupOptions startupOptions, MarkdownProcessingContext context) in F:\workspace\_work\1\s\MLS.Agent\CommandLine\VerifyCommand.cs:line 84

Just to clarify I also have this problem using Option 2: starting from scratch. Verify also returns the exact same error.

pyrocumulus avatar Mar 30 '23 08:03 pyrocumulus