You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ElectronNET.CLI/Commands/Actions/GetTargetPlatformInformation.cs
+47-2Lines changed: 47 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
usingSystem;
2
+
usingSystem.Diagnostics;
2
3
usingSystem.Runtime.InteropServices;
3
4
4
5
namespaceElectronNET.CLI.Commands.Actions
@@ -30,6 +31,15 @@ public static GetTargetPlatformInformationResult Do(string desiredPlatform, stri
30
31
case"osx-arm64":
31
32
netCorePublishRid="osx-arm64";
32
33
electronPackerPlatform="mac";
34
+
35
+
//Check to see if .net 6 is installed:
36
+
if(!Dotnet6Installed())
37
+
{
38
+
thrownewArgumentException("You are using a dotnet version older than dotnet 6. Compiling for osx-arm64 requires that dotnet 6 or greater is installed and targeted by your project.","osx-arm64");
39
+
}
40
+
41
+
//Warn for .net 6 targeting:
42
+
Console.WriteLine("Please ensure that your project targets .net 6 or greater. Otherwise you may experience an error compiling for osx-arm64.");
33
43
break;
34
44
case"linux":
35
45
netCorePublishRid="linux-x64";
@@ -52,8 +62,11 @@ public static GetTargetPlatformInformationResult Do(string desiredPlatform, stri
0 commit comments