From 776907d49651bb8fea15840c64ae16608e52e62c Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Sat, 9 Aug 2025 02:17:49 +1000 Subject: [PATCH] update project runnable condition --- .../Features/SolutionDiscovery/VsPersistence/SharpIdeModels.cs | 2 +- src/SharpIDE.Photino/Components/RunPopover.razor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/SharpIdeModels.cs b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/SharpIdeModels.cs index 91a3127..84a92a9 100644 --- a/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/SharpIdeModels.cs +++ b/src/SharpIDE.Application/Features/SolutionDiscovery/VsPersistence/SharpIdeModels.cs @@ -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; } } diff --git a/src/SharpIDE.Photino/Components/RunPopover.razor b/src/SharpIDE.Photino/Components/RunPopover.razor index 5bd3ee9..848d01b 100644 --- a/src/SharpIDE.Photino/Components/RunPopover.razor +++ b/src/SharpIDE.Photino/Components/RunPopover.razor @@ -50,7 +50,7 @@ [Parameter, EditorRequired] public SharpIdeSolutionModel SolutionModel { get; set; } = null!; - private IEnumerable RunnableProjects => SolutionModel.AllProjects.Where(p => p.MsBuildEvaluationProject.GetPropertyValue("OutputType") is "Exe" or "WinExe"); + private IEnumerable RunnableProjects => SolutionModel.AllProjects.Where(p => p.IsRunnable); private bool _open = false; private bool _ready = false;