Runtime: System.IO.Pipes.AccessControl missing from shared framework on non-Windows

Created on 8 Dec 2018  路  7Comments  路  Source: dotnet/runtime

System.IO.Pipes.AccessControl is in the shared framework on Windows, in the Microsoft.NETCore.App package platform manifest, but missing from the shared framework on non-Windows. It was there in 2.x, but now gone in 3.0

Repro steps

  1. Install .NET Core 3.0 Preview 1 on a Linux box
  2. mkdir repro && cd repro
  3. dotnet new console
  4. Edit Program.cs

``` C#
using System;
using System.IO.Pipes;
using System.Security.AccessControl;

namespace repro
{
class Program
{
static void Main(string[] args)
{
var x = new PipeAccessRule("foo", PipeAccessRights.FullControl, AccessControlType.Allow);
}
}
}


4. Edit repro.csproj
``` xml
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="System.IO.Pipes.AccessControl" Version="4.3.0" />
  </ItemGroup>
</Project>
  1. dotnet run

Expected

Unhandled Exception: System.PlatformNotSupportedException: Access Control List (ACL) APIs are part of resource management on Windows and are not supported on this platform.
   at System.Security.AccessControl.AuthorizationRule..ctor(IdentityReference identity, Int32 accessMask, Boolean isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
   at System.Security.AccessControl.AccessRule..ctor(IdentityReference identity, Int32 accessMask, Boolean isInherited, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AccessControlType type)
   at System.IO.Pipes.PipeAccessRule..ctor(String identity, PipeAccessRights rights, AccessControlType type)
   at repro.Program.Main(String[] args) in /home/nicholg/repro/Program.cs:line 11

You can see this working by targeting netcoreapp2.1 and running on netcoreapp2.1

Actual

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.Pipes.AccessControl, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified

cc @jaredpar @tmat @ericstj @livarcocc

This is blocking an insertion with latest roslyn into the SDK.

area-System.IO bug

All 7 comments

How involved is the fix? A quick turnaround would be much appreciated to get our toolset insertions into the SDK unblocked.

Thanks!

Fixed by dotnet/corefx#33936

Who can help me track down the code flow to core-sdk for this. We haven't gotten an insertion with this. Where in the process is this stuck:

  • corefx build?
  • corefx to core-setup insertion?
  • core-setup build?
  • core-setup insertion to core-sdk?

CoreFx build has been broken for the last few days. @ViktorHofer is working on a fix.

http://mc.dot.net is the place to start looking for this info.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jchannon picture jchannon  路  3Comments

omariom picture omariom  路  3Comments

chunseoklee picture chunseoklee  路  3Comments

Timovzl picture Timovzl  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments