Unable to build for windows 32-bits #195

Closed
opened 2026-01-29 16:33:21 +00:00 by claunia · 7 comments
Owner

Originally created by @PabloLilao on GitHub (Jul 11, 2018).

I followed the instructions in the getting started video choosing an Angular Template project.

I have my demo project and I'm able to run it with dotnet electronize start and building it with dotnet electronize build /target win and the project builded runs fine.

But when I try to build using dotnet electronize build build /target custom win7-x86;win32 /electron-arch ia32 I get the following error:

Build Electron Application...

Unhandled Exception: System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.) ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at ElectronNET.CLI.Commands.Actions.GetTargetPlatformInformation.Do(String desiredPlatform, String specifiedPlatfromFromCustom)
at ElectronNET.CLI.Commands.BuildCommand.b__13_0()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at ElectronNET.CLI.Program.Main(String[] args)

Originally created by @PabloLilao on GitHub (Jul 11, 2018). I followed the instructions in the [getting started video](https://www.youtube.com/watch?v=nuM6AojRFHk) choosing an Angular Template project. I have my demo project and I'm able to run it with `dotnet electronize start` and building it with `dotnet electronize build /target win` and the project builded runs fine. But when I try to build using `dotnet electronize build build /target custom win7-x86;win32 /electron-arch ia32` I get the following error: Build Electron Application... Unhandled Exception: System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.) ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at ElectronNET.CLI.Commands.Actions.GetTargetPlatformInformation.Do(String desiredPlatform, String specifiedPlatfromFromCustom) at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__13_0() at System.Threading.Tasks.Task\`1.InnerInvoke() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task\`1.GetResultCore(Boolean waitCompletionNotification) at ElectronNET.CLI.Program.Main(String[] args)
Author
Owner

@PabloLilao commented on GitHub (Jul 11, 2018):

Just escape the semicolon if you are using powershell like this:
"dotnet electronize build build /target custom win7-x86`;win32 /electron-arch ia32"

@PabloLilao commented on GitHub (Jul 11, 2018): Just escape the semicolon if you are using powershell like this: "dotnet electronize build build /target custom win7-x86`;win32 /electron-arch ia32"
Author
Owner

@carlobonamico commented on GitHub (Nov 22, 2019):

I found this to be useful in determining which values you have to pass to
electronize build /custom...

https://docs.microsoft.com/it-it/dotnet/core/rid-catalog

By looking at the electronize tool source code, you can see that the first value means the dotnet build Runtime Id, while hte second value represents electron builder architecture

case "custom":
                    var splittedSpecified = specifiedPlatfromFromCustom.Split(';');
                    netCorePublishRid = splittedSpecified[0];
                    electronPackerPlatform = splittedSpecified[1];

I succeded in building a 32 bit version by means of
electronize.exe build /target custom win-x86;win /dotnet-configuration Debug /electron-arch ia32

@carlobonamico commented on GitHub (Nov 22, 2019): I found this to be useful in determining which values you have to pass to `electronize build /custom...` https://docs.microsoft.com/it-it/dotnet/core/rid-catalog By looking at the electronize tool source code, you can see that the first value means the dotnet build Runtime Id, while hte second value represents electron builder architecture ``` case "custom":                     var splittedSpecified = specifiedPlatfromFromCustom.Split(';');                     netCorePublishRid = splittedSpecified[0];                     electronPackerPlatform = splittedSpecified[1]; ``` I succeded in building a 32 bit version by means of `electronize.exe build /target custom win-x86;win /dotnet-configuration Debug /electron-arch ia32`
Author
Owner

@yannisraft commented on GitHub (Jun 23, 2020):

Hi i am trying to build the application for the 32 bit version and i still receive the error

Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.
)
 ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at ElectronNET.CLI.Commands.Actions.GetTargetPlatformInformation.Do(String desiredPlatform, String specifiedPlatfromF
romCustom) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\Actions\GetTargetPlatformInformation.cs:line 17
   at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__19_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Comma
nds\BuildCommand.cs:line 77
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executio
nContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executio
nContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at System.Threading.Tasks.Task`1.get_Result()
   at ElectronNET.CLI.Program.Main(String[] args) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 59
win32 : The term 'win32' is not recognized as the name of a cmdlet, function, script file, or operable program. Check t
he spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:43
+ electronize build /target custom win7-x86;win32 /dotnet-configuration ...
+                                           ~~~~~
    + CategoryInfo          : ObjectNotFound: (win32:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I am using the electron.NET CLI version 9.31.1 on a Windows 10 machine
I tried to build it using the following command:

electronize.exe build /target custom win-x86;win /dotnet-configuration Debug /electron-arch ia32

@yannisraft commented on GitHub (Jun 23, 2020): Hi i am trying to build the application for the 32 bit version and i still receive the error ``` Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array. ) ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at ElectronNET.CLI.Commands.Actions.GetTargetPlatformInformation.Do(String desiredPlatform, String specifiedPlatfromF romCustom) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Commands\Actions\GetTargetPlatformInformation.cs:line 17 at ElectronNET.CLI.Commands.BuildCommand.<ExecuteAsync>b__19_0() in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Comma nds\BuildCommand.cs:line 77 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executio nContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executio nContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at ElectronNET.CLI.Program.Main(String[] args) in D:\Code\GitHub\Electron.NET\ElectronNET.CLI\Program.cs:line 59 win32 : The term 'win32' is not recognized as the name of a cmdlet, function, script file, or operable program. Check t he spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:43 + electronize build /target custom win7-x86;win32 /dotnet-configuration ... + ~~~~~ + CategoryInfo : ObjectNotFound: (win32:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ``` I am using the electron.NET CLI version 9.31.1 on a Windows 10 machine I tried to build it using the following command: `electronize.exe build /target custom win-x86;win /dotnet-configuration Debug /electron-arch ia32`
Author
Owner

@arun-chief commented on GitHub (Nov 1, 2020):

this method worked, i used finally electronize.exe build /target custom "win-x86;win" /dotnet-configuration Debug /electron-arch ia32

@arun-chief commented on GitHub (Nov 1, 2020): this method worked, i used finally `electronize.exe build /target custom "win-x86;win" /dotnet-configuration Debug /electron-arch ia32`
Author
Owner

@arun-chief commented on GitHub (Nov 1, 2020):

This one worked for me 32 bit windows
electronize.exe build /target custom "win-x86;win" /dotnet-configuration Debug /electron-arch ia32

@arun-chief commented on GitHub (Nov 1, 2020): This one worked for me 32 bit windows `electronize.exe build /target custom "win-x86;win" /dotnet-configuration Debug /electron-arch ia32`
Author
Owner

@rjsgml5698 commented on GitHub (Sep 13, 2022):

Can I make this a single installer (.exe)?

@rjsgml5698 commented on GitHub (Sep 13, 2022): Can I make this a single installer (.exe)?
Author
Owner

@gpgpublickey commented on GitHub (Sep 13, 2022):

Short answer, no, you can try to use packers but is not a good idea, antivirus hates packers

@gpgpublickey commented on GitHub (Sep 13, 2022): Short answer, no, you can try to use packers but is not a good idea, antivirus hates packers
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#195