Skip to content
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ PublishScripts/
*.nuget.props
*.nuget.targets

# NuGet executable
Comment thread
simonrozsival marked this conversation as resolved.
Outdated
.nuget/nuget.exe
Comment thread
simonrozsival marked this conversation as resolved.
Outdated

Comment thread
simonrozsival marked this conversation as resolved.
Outdated
# Microsoft Azure Build Output
csx/
*.build.csdef
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,21 @@ protected async Task<IEnumerable<Simulator>> GetAvailableSimulators()

foreach (JsonProperty sim in simulators.RootElement.EnumerateObject())
{
if (sim.Value.GetProperty("runtimeIdentifier").GetString() == runtimeIdentifier)
// Skip entries that don't have a runtimeIdentifier property (e.g., unusable simulators)
if (!sim.Value.TryGetProperty("runtimeIdentifier", out var runtimeIdProperty))
{
var version = sim.Value.GetProperty("version").GetString();
continue;
}

if (runtimeIdProperty.GetString() == runtimeIdentifier)
{
// Also check if version property exists
if (!sim.Value.TryGetProperty("version", out var versionProperty))
{
return null;
}

var version = versionProperty.GetString();
if (version == null)
return null;

Expand Down