Git Product home page Git Product logo

Comments (7)

MScholtes avatar MScholtes commented on July 17, 2024 1

I will investigate what the best to do (but a message "Operation is not supported on this platform" is self speaking).

But first I go on vacation, more in three weeks...

from ps2exe.

MScholtes avatar MScholtes commented on July 17, 2024

Hello kewalsky,

the issue with PS2EXE and PowerShell 6 or 7 is the underlying .Net Core. PS2EXE compiles a frame C# program containing the PowerShell script. .Net Core (and so PowerShell 7) does not deliver a compiler anymore in its base installation, one has to install the SDK to get one ("Roslyn").

And once there is the compiler, the calling method has changed completely. I do not know how to implement this without weeks of work. If someone has a good idea how to make it "cheap", please tell.

Sorry, at the moment I see no possibility to provide support for Powershell Core.

Greetings

Markus

from ps2exe.

kewalsky avatar kewalsky commented on July 17, 2024

I buried it in there as the third example but it still does appear to run on Core v7 as long as you do "Import-Module ps2exe -UseWindowsPowerShell" before the Invoke-ps2exe command. I don't know if it would be feasible to have it detect the version of PowerShell it is running on and throw a warning or maybe just add an aside under the usage section of the Readme?

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_windows_powershell_compatibility?view=powershell-7

from ps2exe.

MScholtes avatar MScholtes commented on July 17, 2024

Another option would be to download the script based version of PS2EXE from TechNet-Gallery or PS2EXE-GUI: "Convert" PowerShell Scripts to EXE Files with GUI and compile it with itself.
You can then use the executable ps2exe.exe to compile from Powershell Core (unfortunately then the automatic parameter expansion is missing).

Greetings

Markus

from ps2exe.

MScholtes avatar MScholtes commented on July 17, 2024

Now back from vacation I will look for a solution or remedy

Greetings

Markus

from ps2exe.

MScholtes avatar MScholtes commented on July 17, 2024

Hello Keith,

I released the new version 1.0.6 of PS2EXE today with (limited) support for PowerShell Core. Since PowerShell Core has no compiler built in, PS2EXE starts a new instance of Windows PowerShell and runs PS2EXE there.

Hope this helps and works for you

Greetings

Markus

from ps2exe.

kewalsky avatar kewalsky commented on July 17, 2024

Yes I can confirm it compiled, thank you!

from ps2exe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.