update project runnable condition

This commit is contained in:
Matt Parker
2025-08-09 02:17:49 +10:00
parent a0f59bab48
commit 776907d496
2 changed files with 2 additions and 2 deletions

View File

@@ -35,6 +35,6 @@ public class SharpIdeProjectModel : ISharpIdeNode
? MsBuildEvaluationProjectTask.Result
: throw new InvalidOperationException("Do not attempt to access the MsBuildEvaluationProject before it has been loaded");
public bool IsRunnable => MsBuildEvaluationProject.GetPropertyValue("OutputType") is "Exe" or "WinExe";
public bool IsRunnable => MsBuildEvaluationProject.Xml.Sdk is "Microsoft.NET.Sdk.BlazorWebAssembly" || MsBuildEvaluationProject.GetPropertyValue("OutputType") is "Exe" or "WinExe";
public bool OpenInRunPanel { get; set; }
}

View File

@@ -50,7 +50,7 @@
[Parameter, EditorRequired]
public SharpIdeSolutionModel SolutionModel { get; set; } = null!;
private IEnumerable<SharpIdeProjectModel> RunnableProjects => SolutionModel.AllProjects.Where(p => p.MsBuildEvaluationProject.GetPropertyValue("OutputType") is "Exe" or "WinExe");
private IEnumerable<SharpIdeProjectModel> RunnableProjects => SolutionModel.AllProjects.Where(p => p.IsRunnable);
private bool _open = false;
private bool _ready = false;