Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.
Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.
Separate PR coming to update contribution document for new source files: #6140
Manually reviewed each change.
Fix#6073
Remove the code that spins up our own assembly load context. Keep the code that registers our `Resolve` method to the default loader's `Resolving` event, so that we can continue to do special assembly resolution as needed (such as the GAC probing logic needed for consuming FullCLR PS modules).
Essentially, the assembly `Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.dll` is not needed anymore, the remaining code should be moved to S.M.A.dll. However, that will break DSC and other native hosts that are hosting powershell. So this assembly is kept for now.
- Replace src\powershell top level project by two
new root-level projects:
- src\powershell-unix
- src\powershell-windows
- Break src\Modules into more granular structure:
- Shared
- Windows+Unix-Core
- Windows-Core
- Windows-Core+Full
- Windows-Full
- To be created: Unix-Core. We will do it as a separate PR
- Fix#1122 : Platform-specific set of Modules (and assemblies)
- Fix Start-TypeGen to work with new top level folders layout
- Add Start-PSBuild -Clean
- Normalize $env:PATH references in .\build.psm1
- Add more logging in Resolve-Xaml for troubleshooting
- Always use msbuild from the Microsoft.NET v4.0.30319
- Rename Resolve-Xaml into Start-XamlGen for consistency with Start-TypeGen and Start-ResGen
- Disable pwrshplugin build temporarely
These must be duplicated as we require the same files for both `build`
and `publish`. This is the requirement of the new schema, as `content`
was split.
Note that while each key can take an object, if given just a `string[]`
as we do here, it defaults to `include`.
See the new schema: https://github.com/aspnet/Announcements/issues/175
The powershell project's `Main` function initializes the custom
`AssemblyLoadContext` and then delegates to `UnmanagedPSEntry.Start`.
This lets us undo several changes to the `ConsoleHost` managed
entry (notably, the `Start` function signature does not have to change,
thus the `consoleFilePath` variable still exists).
The `src/powershell` project builds Core PowerShell as a .NET CLI app,
with a dependency on `Microsoft.PowerShell.ConsoleHost`, so that the
latter can remain a library.