- Can compile a source from strings (TypeDefinition and MemberDefinition).
- Can compile from files.
- Can compile only to a file (without loading the produced assembly).
- Do not recompile and don't reload if the sources have not changed.
- Implement `-IgnoreWarnings` to not treat warnings as errors. By default, the cmdlet considers warnings as errors.
- Add VisualBasic support.
- Add new `-CompilerOptions` parameter to allow setting Roslyn command line parameters including:
- Parser options.
- Compile options.
- Emit options.
**ATTENTION:** The `CompilerOptions` can be specified along with other options like `-OutputAssembly`, `-Language` and `-IgnoreWarnings`. The explicit setting parameters will take precedence over the same settings specified in `-CompileOptions`.
See docs about the compiler options:
https://github.com/dotnet/roslyn/blob/master/docs/compilers/CSharp/CommandLine.mdhttps://github.com/dotnet/roslyn/blob/master/docs/compilers/Visual%20Basic/CommandLine.md
**ATTENTION:** `-OutputType` default is `Library`. If `-OutputType` is absent the `-OutputType` default overlaps a value in `CompileOptions`. In other words output type ("target" ot "t" in command line) is always ignored in `CompileOptions`. We have to use `-OutputType` to set an output type.
Use safe pattern 'columns <= columnsThresHold ? stackalloc int[columns] : new int[columns];'
Remove duplicate code.
Use common 'columnsThresHold' constant.
- For ConsoleHosts tests, the test is validating error condition, but did not redirect stderr to stdout so the output isn't captured and thus an empty string failing the assertion.
- For SSHConnectionInfo API tests, it's calling a constructor that got overwritten with a new parameter. Fix is to put back that public API and overload it with a new one.
The current implementation of PSRP over SSH only enables remoting to one version of PowerShell Core 6.
sshd_config allows specifying multiple subsystems that can start different versions of PowerShell Core 6 (or same versions with different parameters).
Enable use of a new -Subsystem parameter to specify the subsystem to use with ssh.
These changes port Windows PowerShell support for Applocker and DeviceGuard User Mode Code Integrity (UMCI) to PSCore6. Windows PowerShell uses public APIs to determine if a system is in locked down mode via AppLocker or DeviceGuard, and automatically runs in constrained language mode. For more information about PowerShell constrained language, see: https://blogs.msdn.microsoft.com/powershell/2017/11/02/powershell-constrained-language-mode/
This support for application whitelisting has mostly existed in PSCore6, but the primary APIs were stubbed out in CorePSStub.cs because they relied on Windows only DeviceGuard (wldp.dll) and AppLocker (Safer APIs) public APIs. These changes re-implement PowerShell lock down APIs on PSCore6 for Windows platforms only. The AppLocker and DeviceGuard public APIs are currently only implemented in Windows OSes and are not supported on Linux or MacOS platforms.
Tests have also been ported to PSCore6 and run only for Windows platforms.
'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.
'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.
'GetTypeInfo()' were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in 'System.Type' were missing at that time. Now the call is not needed anymore and should be removed.
Add meta properties to mac VSTS YAML
- Add a property to clean the build machine
- Add a property to set the format of the build name
- add a property to set which queue to run the build in
`GetTypeInfo()` were added when porting PowerShell to early version of .NET Core (prior .NET Core 1.0).
Most properties and methods in `System.Type` were missing at that time. Now the call is not needed anymore and should be removed.
Since a PR added support to opt out of telemetry via an environment variable, we can remove the,
always intended to be a temporary, solution of deleting a file to opt out of telemetry since the
environment variable can be defined at the system level and exist before even installing PowerShell Core.
Because the variable is defined as opt out, a value of true, yes, or 1 means no telemetry is sent.
Make the `PSISERemoteSessionOpenFile` a support event, so that `Get-EventSubscriber` won't show that subscriber. `Get-EventSubscriber -Force` can still show the support event subscribers. `Unregister-Event -Force` needs to be used to remove a support event subscriber.
The event subscriber for `PSInternalRemoteDebuggerStopEvent` and `PSInternalRemoteDebuggerBreakpointUpdatedEvent` are already made support events. And this PR makes it the same for `PSISERemoteSessionOpenFile`.
Clean up unneeded `GetTypeInfo()` calls in interpreter code.
The `GetTypeInfo()` calls were added back in the early days of .NET Core, when most of the properties and methods of `System.Type` were removed. Now those properties and methods are back in `System.Type`, so there is no need to keep those calls.
- Remove the calls to `GetTypeInfo()` in the generated `.resx` binding C# binding code (change in the tool `ResGen`).
- Remove the unused methods in `SessionState.cs`.
- Remove the calls to `GetTypeInfo()` from `Compiler.cs` and other files in `engine\runtime`.
- Fix typos in `VariableAnalysis.cs` and `ClassOps.cs`.
- Minor perf improvement in `MutableTuple.cs` by using indexing instead of linq extension method `last()`.
Create the default PSSession configuration, not tied to a specific PowerShell version.
When Enable-PSRemoting command is run, it creates 2 sessions configurations:
first, the same as it was before with the name containing the current version expressed as: 'PowerShell.$PSVersionTable.GitCommitId'
second with the default name 'PowerShell.6' so that administrators wouldn't have to guess which specific version is installed on the target.
PR addresses the issue: #6470
* Use UTC datetime in Get-Date -UFormat %s
Fix %l output from 0..11 to 1..12
Fix %V using Gregorian calendar
* Use a workaround for ISO 8601 week of year (uformat %V)