With the switch to `netstandardapp1.5` framework for the host, the xUnit
test runner broke. For `dotnet test` to work with the .NET Core xUnit
runner, it must continue to target `dnxcore50`. Fortunately, we can
import our project's framework, and make everything work again.
Also improved the `xunit.sh` script to check for dependencies.
With the latest packages, a lot more System.Console API is available.
This commit implements what is now available through the API.
Where an API functions correctly on Linux, the result of a call through
PowerShell works as expected. Where it is not, a nice
`PlatformNotSupported` exception is thrown (and displayed by
PowerShell).
On Linux:
- `$host.ui.RawUI.WindowTitle` can be set but cannot be get
- `$host.ui.RawUI.CusorPosition` can be set and get
- `$host.ui.RawUI.CursorSize` can be get but cannot be set
- `$host.ui.RawUI.MaxPhysicalWindowSize` can be get
- `$host.ui.RawUI.MaxWindowSize` can be get
- `$host.ui.RawUI.WindowPosition` can be get but cannot be set
- `$host.ui.RawUI.WindowSize` can be get but cannot be set
- `$host.ui.RawUI.ReadKey` can be be used, but is only approximate
All libraries now use the framework `netstandard1.5`, and import the
`dnxcore50` and `portable` frameworks. The app that is published,
Microsoft.PowerShell.Linux.Host, that is, the top-level dependency that
emits an executable, instead targets `netstandardapp1.5` and has a new
`runtimes` key so that .NET CLI's `restore` and `publish` commands know
which runtime implementations to resolve.
When switching to the new CLI, we needed to fix how we specified our
dependencies. In particular, the .NET CLI team helped me figure out how
to download packages that are reference assembly only on Linux, with
implementations on Windows. The result of this is the new `frameworks`
setup.
Additionally, we were incorrectly specifying our build dependencies;
that is, projects we also build (not packages). The solution was much
cleaner. We removed the `type: build` section and replaced it with the
version `1.0.0-*` that all our projects currently use.
The `project.json` files also had their names, descriptions,
indentation, and versions fixed.
The build scripts were simplified.
Unfortunately a wrapper is needed because `LD_LIBRARY_PATH` must be set
to avoid having to place build artifacts (specifically
`libpsl-native.so`) out-of-tree to run tests.
This was a temporary work-around that now needs to be removed (mostly
because the xUnit tests are out-of-date because we didn't have a runner,
and it's not worth it to fix them). Rather than let more cruft
accumulate, we need to remove it.
Resolves#551
Although there is a dedicated `coreclr-xunit` feed for this package, it
is missing some needed dependencies. Rather than add yet another feed
(`aspnetvnext`), we'll use the `cli-deps` feed as it has all the
packages that `dotnet-test-xunit` needs, and is likely to stick around.
It is odd, but they're unsupported here. If a version is given, it
causes every build/publish to think it needs to be restored again,
because the lock file doesn't end up with a version.
Add almost all files to Microsoft.PowerShell.Commands.Management
One of them is Computer.cs that was listed in known issues.
We start to use a nuget packages generated for assemlbies that
cannot be listed in framework assemlbies, but exist in a GAC
on all windows machine and not a PowerShell assemblies
The first one is Microsoft.WSMan.Management