Operating system: Windows 10 v1709 (64-bit)
I recently upgraded my PowerShell Studio installation (from PowerShell Studio 2015 to PowerShell Studio 2018), and now whenever I create a new project, or open an existing project, I always receive the following error message:
- Startup.pss: Could not load file or assembly 'System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Also, if I look at the assemblies for the "Startup.pss", I see the following:
I was not receiving this error message when PowerShell Studio 2015 was installed. I've only started receiving this error after I upgraded to PowerShell Studio 2018.
For clarification, here is the "Startup.pss" that is being generated whenever I start a new project and receive this error message:
- #Define a Param block to use custom parameters in the project
- #Param ($CustomParameter)
- function Main {
- <#
- .SYNOPSIS
- The Main function starts the project application.
- .PARAMETER Commandline
- $Commandline contains the complete argument string passed to the script packager executable.
- .NOTES
- Use this function to initialize your script and to call GUI forms.
- .NOTES
- To get the console output in the Packager (Forms Engine) use:
- $ConsoleOutput (Type: System.Collections.ArrayList)
- #>
- Param ([String]$Commandline)
- #--------------------------------------------------------------------------
- #TODO: Add initialization script here (Load modules and check requirements)
- #--------------------------------------------------------------------------
- if((Show-MainForm_psf) -eq 'OK')
- {
- }
- $script:ExitCode = 0 #Set the exit code for the Packager
- }