Comments (7)
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.
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.
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?
from ps2exe.
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.
Now back from vacation I will look for a solution or remedy
Greetings
Markus
from ps2exe.
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.
Yes I can confirm it compiled, thank you!
from ps2exe.
Related Issues (20)
- Why does it make these connections? HOT 2
- Long path prefix not working HOT 2
- Error CS1034: Compiler limit exceeded: Line cannot exceed 16777214 characters HOT 4
- Powershell Core - 7 HOT 6
- The module may have listeners HOT 3
- Issue with HKCU registry in compiled script? HOT 1
- Declaring a parameter as [string] does not pass on value of parameter if [switch] params also declared. HOT 1
- Invoke-ps2exe : 无法将“Invoke-ps2exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路 径,请确保路径正确,然后再试一次。 HOT 2
- Add special variables to determine if a script is running in ps2exe or not HOT 2
- Continuous Integration: auto test scripts when PR and Push and auto close of stale issue?
- Console Background, font etc. HOT 7
- Socket detected as malware
- PS2EXE pathing issue after converting to exe HOT 6
- PS2EXE may be sucking up the compiled scripts HOT 4
- ps2exe - Not sure if it is a problem or limitation HOT 5
- More of a question. How to get the exe to output an exit code? HOT 2
- Doesn't Support Threading. HOT 2
- Windows 10 Patch from March 2024 breaks Powershell script HOT 5
- - HOT 1
- The necessary DLL cannot be loaded. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ps2exe.