This resolves issue #5391, which is tagged with 6.0.0-GA, therefore this should help with getting pwsh out of the door in January.
It removes PerformWSManPluginReportCompletion as stated in the issue and its associated class member g_pPluginContext, which is now unused as well.
The best reviewer is probably @mirichmo , who raised the initial issue with very helpful descriptions or @dantraMSFT who is currently assigned to the issue.
* Disambiguate icon for daily builds on Windows.
Some code had to be borrowed from build.psm1 because this script has to be self contained in case it gets executed by only downloading this file via the published download link https://twitter.com/Steve_MSFT/status/930585082451992576
* add template xml for package signing
* Add script to generate package signing XML
* remove uploading artifact, it always fails.
* Allow the XML to be updated to be specified
- Fix build in vscode
- Add v2.0.0 tasks.json thanks to Keith Hill
- Add '/property:GenerateFullPaths=true' to build to fix the $mscompile 'problem matcher' not working issue.
Replace the static `powershell.inc` filename with a name based on the current RID, so that the build doesn't confuse when running in the same local repository on WSL.
* Add standard set of vscode workspace setting files
Add an extensions.json file that will prompt folks to install extensions that are recommended for this workspace (c++, c#, powershell, cmake (editing syntax) and markdown linter.
Add settings.json to start to configure C# syntax, PoweShell trim trailing whitespace and configure the markdown lint extension.
Update launch.json to provide ability to debug PowerShell scripts.
* Clean up grammar
* Instruct VSCode to ensure a final newline.
If this is not wanted for certain file types, we can restrict this option to only specified file types.
CoreCLR doesn't call finalizer on process exit. PowerShell relies on the CLR finalizer to clean up state on exit. In this case, a Runspace pool was not closed or disposed and any pipeline worker threads created to run concurrent scripts won't end, causing the hang. The same thing can happen if any individual Runspace is created to run a concurrent script and is not closed.
We cannot use the `AppDomain.DomainUnload` event because it's not supported by the default load context. The `AppDomain.ProcessExit` event is also not helpful since it is only called during application exit which means threads already have to be cleaned up.
The fix introduces a static property called `PrimaryRunspace` to `Runspace`. When the PrimaryRunspace is closing it means that the PowerShell session is ending and on exit clean should be performed. The static property `PrimaryRunspace` can only be set once per process.
1. Remove `[validate]` attribute from parameter so this script can be invoked directly from the web. This doesn't have any negative impact as the $Destination parameter will have a default value if null or empty.
2. Move removal of destination folder later as installing the package requires package management module and archive module (on Windows)
3. On Windows, because files have open handles when run from existing powershell-daily install, I rename the existing files and copy over the new ones. User needs to exit and restart `pwsh` to take effect (similar to macOS/Linux where you have to exit and restart anyways)
* Add two files that need to be signed
* make sure to set PSModuleRestore to true when expanding a signed build because we run PSModuleRestore at that point.
* suppress output of CmdLets which are noisy