handle running blazor projects

This commit is contained in:
Matt Parker
2025-08-24 14:13:15 +10:00
parent dd069cf084
commit ce90720352
2 changed files with 27 additions and 3 deletions

View File

@@ -94,7 +94,9 @@ public class SharpIdeProjectModel : ISharpIdeNode, IExpandableSharpIdeNode, IChi
? MsBuildEvaluationProjectTask.Result
: throw new InvalidOperationException("Do not attempt to access the MsBuildEvaluationProject before it has been loaded");
public bool IsRunnable => MsBuildEvaluationProject.Xml.Sdk is "Microsoft.NET.Sdk.BlazorWebAssembly" || MsBuildEvaluationProject.GetPropertyValue("OutputType") is "Exe" or "WinExe";
public bool IsRunnable => IsBlazorProject || MsBuildEvaluationProject.GetPropertyValue("OutputType") is "Exe" or "WinExe";
public bool IsBlazorProject => MsBuildEvaluationProject.Xml.Sdk is "Microsoft.NET.Sdk.BlazorWebAssembly";
public string BlazorDevServerVersion => MsBuildEvaluationProject.Items.Single(s => s.ItemType is "PackageReference" && s.EvaluatedInclude is "Microsoft.AspNetCore.Components.WebAssembly.DevServer").GetMetadataValue("Version");
public bool OpenInRunPanel { get; set; }
public Channel<byte[]>? RunningOutputChannel { get; set; }
public event Func<Task> ProjectStartedRunning = () => Task.CompletedTask;