Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions sources/engine/Stride.Assets/StrideConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ public sealed class StrideConfig
private static readonly Version VS2015Version = new Version(14, 0);
private static readonly Version VSAnyVersion = new Version(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue);

internal static readonly Dictionary<Version, string> XamariniOSComponents = new Dictionary<Version, string>
internal static readonly Dictionary<Version, string> DotNetForiOSComponents = new Dictionary<Version, string>
{
{ VSAnyVersion, @"Component.Xamarin" },
{ VSAnyVersion, @"Microsoft.VisualStudio.Workload.NetCrossPlat" },
{ VS2015Version, @"MSBuild\Xamarin\iOS\Xamarin.iOS.CSharp.targets" }
};

internal static readonly Dictionary<Version, string> XamarinAndroidComponents = new Dictionary<Version, string>
internal static readonly Dictionary<Version, string> DotNetForAndroidComponents = new Dictionary<Version, string>
{
{ VSAnyVersion, @"Component.Xamarin" },
{ VSAnyVersion, @"Microsoft.VisualStudio.Workload.NetCrossPlat" },
{ VS2015Version, @"MSBuild\Xamarin\Android\Xamarin.Android.CSharp.targets" }
};

Expand Down Expand Up @@ -143,7 +143,7 @@ internal static void RegisterSolutionPlatforms()
Name = PlatformType.Android.ToString(),
Type = PlatformType.Android,
TargetFramework = "net10.0-android",
IsAvailable = IsVSComponentAvailableAnyVersion(XamarinAndroidComponents)
IsAvailable = IsVSComponentAvailableAnyVersion(DotNetForAndroidComponents)
};
androidPlatform.DefineConstants.Add("STRIDE_PLATFORM_MONO_MOBILE");
androidPlatform.DefineConstants.Add("STRIDE_PLATFORM_ANDROID");
Expand All @@ -170,7 +170,7 @@ internal static void RegisterSolutionPlatforms()
SolutionName = "iPhone", // For iOS, we need to use iPhone as a solution name
Type = PlatformType.iOS,
TargetFramework = "net10.0-ios",
IsAvailable = IsVSComponentAvailableAnyVersion(XamariniOSComponents)
IsAvailable = IsVSComponentAvailableAnyVersion(DotNetForiOSComponents)
};
iphonePlatform.PlatformsPart.Add(new SolutionPlatformPart("iPhoneSimulator"));
iphonePlatform.DefineConstants.Add("STRIDE_PLATFORM_MONO_MOBILE");
Expand Down Expand Up @@ -240,12 +240,19 @@ internal static bool IsVSComponentAvailableAnyVersion(IDictionary<Version, strin
{
if (pair.Key == VS2015Version)
{
return IsFileInProgramFilesx86Exist(pair.Value);
if(IsFileInProgramFilesx86Exist(pair.Value))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: space after if

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

{
return true;
}
continue;
}

return VisualStudioVersions.AvailableInstances.Any(
if(VisualStudioVersions.AvailableInstances.Any(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: space after if

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

ideInfo => ideInfo.PackageVersions.ContainsKey(pair.Value)
);
))
{
return true;
}
}
return false;
}
Expand Down