Repository navigation
Closed
Labels
Milestone
Description
See dotnet/runtime#82453 (comment) for more detail.
Local errors for when the https://github.com/dotnet/runtime/tree/main/src/libraries/System.DirectoryServices/src/CompatibilitySuppressions.xml file is removed (please delete that file when this issue is fixed):
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error : API compatibility errors between 'lib/net6.0/System.DirectoryServices.dll' (C:\Users\sharter\.nuget\packages\
system.directoryservices\7.0.0\system.directoryservices.7.0.0.nupkg) and 'lib/net6.0/System.DirectoryServices.dll' (C:\git\runtime1\artifacts\packages\Debug\Shipping\System.DirectoryServices.8.0.0-dev.nupkg): [C:\git\runtime1\src\libraries\System.DirectoryServices\src\
System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermission' exists on [Baseline] lib/net6.0/System.Dire
ctoryServices.dll but not on lib/net6.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionAccess' exists on [Baseline] lib/net6.0/Syste
m.DirectoryServices.dll but not on lib/net6.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionAttribute' exists on [Baseline] lib/net6.0/Sy
stem.DirectoryServices.dll but not on lib/net6.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionEntry' exists on [Baseline] lib/net6.0/System
.DirectoryServices.dll but not on lib/net6.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionEntryCollection' exists on [Baseline] lib/net
6.0/System.DirectoryServices.dll but not on lib/net6.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error : API compatibility errors between 'lib/net7.0/System.DirectoryServices.dll' (C:\Users\sharter\.nuget\packages\
system.directoryservices\7.0.0\system.directoryservices.7.0.0.nupkg) and 'lib/net7.0/System.DirectoryServices.dll' (C:\git\runtime1\artifacts\packages\Debug\Shipping\System.DirectoryServices.8.0.0-dev.nupkg): [C:\git\runtime1\src\libraries\System.DirectoryServices\src\
System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermission' exists on [Baseline] lib/net7.0/System.Dire
ctoryServices.dll but not on lib/net7.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionAccess' exists on [Baseline] lib/net7.0/Syste
m.DirectoryServices.dll but not on lib/net7.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionAttribute' exists on [Baseline] lib/net7.0/Sy
stem.DirectoryServices.dll but not on lib/net7.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionEntry' exists on [Baseline] lib/net7.0/System
.DirectoryServices.dll but not on lib/net7.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionEntryCollection' exists on [Baseline] lib/net
7.0/System.DirectoryServices.dll but not on lib/net7.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error : API compatibility errors between 'lib/netstandard2.0/System.DirectoryServices.dll' (C:\Users\sharter\.nuget\p
ackages\system.directoryservices\7.0.0\system.directoryservices.7.0.0.nupkg) and 'lib/netstandard2.0/System.DirectoryServices.dll' (C:\git\runtime1\artifacts\packages\Debug\Shipping\System.DirectoryServices.8.0.0-dev.nupkg): [C:\git\runtime1\src\libraries\System.Direct
oryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermission' exists on [Baseline] lib/netstandard2.0/Sys
tem.DirectoryServices.dll but not on lib/netstandard2.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionAccess' exists on [Baseline] lib/netstandard2
.0/System.DirectoryServices.dll but not on lib/netstandard2.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionAttribute' exists on [Baseline] lib/netstanda
rd2.0/System.DirectoryServices.dll but not on lib/netstandard2.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionEntry' exists on [Baseline] lib/netstandard2.
0/System.DirectoryServices.dll but not on lib/netstandard2.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
C:\Users\sharter\.nuget\packages\microsoft.dotnet.apicompat.task\8.0.100-preview.2.23107.1\build\Microsoft.NET.ApiCompat.ValidatePackage.targets(39,5): error CP0001: Type 'System.DirectoryServices.DirectoryServicesPermissionEntryCollection' exists on [Baseline] lib/net
standard2.0/System.DirectoryServices.dll but not on lib/netstandard2.0/System.DirectoryServices.dll [C:\git\runtime1\src\libraries\System.DirectoryServices\src\System.DirectoryServices.csproj]
Activity
ericstj commentedon Mar 16, 2023
This happens because on the baseline comparison APICompat doesn't resolve any references.
sdk/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Runner/ApiCompatRunner.cs
Lines 118 to 121 in 2fd62c3
This is done today because we don't go and restore the baseline package for all of it's frameworks to get those references (including ones from targeting pack, etc). While that might be "most correct" I don't think it's work that's worth the effort.
The way I previously discussed making this work was using the right-hand-side references for the left-hand-side baseline so long as we have them. This should work since those references need to be transitively compatible with the left-hand-side and we're not interested in validating compatibility of left-hand-side assemblies that are only part of the references and not assemblies under test.
ViktorHofer commentedon Jun 1, 2023
Closed by #32930