Page 1 of 1
After packaging the GUI that I created I am unable to run the executable
Posted: Thu Oct 31, 2024 8:44 am
by ALPSInsurance
After it is packaged, I am getting the error message "The directory name is invalid". It is really hard to know what PowerShell Studio is having a problem with since it not specifying a path that is having problems with. This is a 64-bit package
Product: PowerShell Studio 2024 (64 Bit)
Build: v5.8.248
OS: Windows 11.0.22631
PS Version(s): 5.1.22621.1
Re: After packaging the GUI that I created I am unable to run the executable
Posted: Thu Oct 31, 2024 11:38 am
by ALPSInsurance
I figured out the problem, although the message was not very helpful. I sync my desktop, and documents to OneDrive and it appears that PS Studio doesn't like this and sense PowerShell Studio defaults to "My Documents", might be a good idea for Sapien to look into this issue. I moved the project to a location on my C: drive outside for my OneDrive folder the re-packaged my project and now it is working like a champ.
Re: After packaging the GUI that I created I am unable to run the executable
Posted: Thu Oct 31, 2024 12:20 pm
by Alexander Riedel
The message is a message from the .NET runtime and has nothing to do with PowerShell Studio. Unfortunately at the moment an error like this is displayed, none of our code has even been loaded yet. Due to that there is nothing we can do to make .NET error messages more verbose.
Additionally, a packaged application has no interaction with PowerShell Studio itself, so any such errors you might see are never originating from PowerShell Studio.
Last but not least, OneDrive has a few options that do not work well with .NET applications. If, for instance, your OneDrive is configured to NOT store files locally but only get them on demand, supplemental files or components of a .NET application may not be made available locally just because you launch an executable file.
That is a known issue of OneDrive and also not under our control.
We generally recommend to configure OneDrive so that ALL files are available offline or to move projects outside of the OneDrive folder structure as you have done.