Open HagenGuerrero opened 1 year ago
I got the same problem.
dotnet try demo
could not run
Here's error from the Edge console
same problem
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.
My Attempt:
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.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.<>cDisplayClass4_0.<
2. 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
3. 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)`.
I just started diving into Linq, and I ran into this exact same issue. Is there any workaround until it gets fixed?
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. :(
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...
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...
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.
Describe the bug
Please provide as much information as you can.
Did this error occur while using
dotnet try
or online?dotnet-try
What kind of error was it?
Screenshots
If applicable, add screenshots to help explain your problem.![image](https://user-images.githubusercontent.com/80136129/199623530-1fa28418-0a75-4415-8928-ba1c49d23b9f.png)
Please complete the following: