Repository navigation
Published nuget packages are windows only #5966
Description
Activity
relevant issue in Jupyter-PowerShell Jaykul/Jupyter-PowerShell#12
I'd really ask the team to consider creating compatible packages as a follow up for GA. I know that
dotnettool lacks support for it but I think for the GA release this really worth doing, even if that means doing it with lots of manual labor. That would enable so many cool x-plat scenarios.Desperately need this for my project(s).
We could use Windows Compatibility Pack. But it is preview and require .Net Core 2.1 preview. I don't know can we already use this? /cc Dongbo Wang (@daxian-dbw)
Reacted by Joel BennettWCP don't solve this automatically. We should review our code and wrap such code (#if UNIX ) with
RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { ... }.
To find the code we can use API Analyzerhttps://github.com/dotnet/designs/blob/master/accepted/compat-pack/compat-pack.md
https://blogs.msdn.microsoft.com/dotnet/2017/11/16/announcing-the-windows-compatibility-pack-for-net-core/I don't think we need to switch from platform-specific binaries to runtime checks. The platform-specific binaries are working ...
But if there are platform-specific binaries, then they need to be shipped in the nuget packages, so we can build software that works.
You know:
runtimes/win-x86/native/... runtimes/win-x64/native/... runtimes/linux-x64/native/... runtimes/osx-x64/native/... ...- addedWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build
on Jan 26, 2018 Aditya Patwardhan (@adityapatwardhan) or is this the bug you fixed in the Myget packages?
adityapatwardhan commented
on Feb 21, 2018 MemberMore actionsThis will be fixed when #6167 is merged and the new Nuget Packages are released.
Reacted by sergei

This is really a dupe of #3417 but I wanted to spell out the exact consequences of this problem and maybe encourage the team to create unix-compatible nuget packages for the GA 6.0.1 release.
The problem is in the
#ifdef UNIXthat we have.The nuget packages published to myget only has windows binaries which are compiled without
UNIXdefine (obviously).That leads to runtime failures when trying to host powershell inside dotnet core application on linux and mac, such as https://github.com/Jaykul/Jupyter-PowerShell .
Steps to reproduce
Create a simple application that uses
InitialSessionStateWith csproj file to build it
Run it with
Expected behavior
No error
Actual behavior
Environment data
The failure comes from this code
PowerShell/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs
Lines 68 to 93 in beffdcf