From 3c9fcce29d00d0d38148c4113b17aeeaa5cbc970 Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Mon, 29 Jun 2020 18:06:21 -0400 Subject: [PATCH] Disable P/Invoke analyzer (#38550) --- docs/README.md | 1 - docs/coding-guidelines/pinvoke-checker.md | 39 ------------- eng/CodeAnalysis.ruleset | 8 +++ .../PinvokeAnalyzerExceptionList.analyzerdata | 10 ---- .../Common/src/Interop/Interop.HostPolicy.cs | 4 -- .../Microsoft.IO.Redist/.analyzerdata | 0 .../PinvokeAnalyzerExceptionList.analyzerdata | 29 ---------- .../PinvokeAnalyzerExceptionList.analyzerdata | 27 --------- ...lyzerExceptionList.analyzerdata.netcoreapp | 2 - .../PinvokeAnalyzerExceptionList.analyzerdata | 45 --------------- .../PinvokeAnalyzerExceptionList.analyzerdata | 45 --------------- ...lyzerExceptionList.analyzerdata.netcoreapp | 7 --- ...erExceptionList.analyzerdata.netcoreapp2.0 | 7 --- .../PinvokeAnalyzerExceptionList.analyzerdata | 3 - ...lyzerExceptionList.analyzerdata.netcoreapp | 12 ---- .../PinvokeAnalyzerExceptionList.analyzerdata | 4 -- .../PinvokeAnalyzerExceptionList.analyzerdata | 27 --------- .../PinvokeAnalyzerExceptionList.analyzerdata | 55 ------------------- .../System/Drawing/GdiplusNative.Windows.cs | 2 - .../src/System/Drawing/GdiplusNative.cs | 2 - .../PinvokeAnalyzerExceptionList.analyzerdata | 1 - .../PinvokeAnalyzerExceptionList.analyzerdata | 23 -------- .../PinvokeAnalyzerExceptionList.analyzerdata | 8 --- ...yzerExceptionList.analyzerdata.netstandard | 2 - ...lyzerExceptionList.analyzerdata.netcoreapp | 1 - .../PinvokeAnalyzerExceptionList.analyzerdata | 2 - .../PinvokeAnalyzerExceptionList.analyzerdata | 1 - .../PinvokeAnalyzerExceptionList.analyzerdata | 1 - ...lyzerExceptionList.analyzerdata.netcoreapp | 1 - ...erExceptionList.analyzerdata.netcoreapp2.0 | 1 - ...erExceptionList.analyzerdata.netcoreapp2.1 | 1 - .../PinvokeAnalyzerExceptionList.analyzerdata | 2 - .../PinvokeAnalyzerExceptionList.analyzerdata | 9 --- .../System.Private.CoreLib.csproj | 1 - 34 files changed, 8 insertions(+), 375 deletions(-) delete mode 100644 docs/coding-guidelines/pinvoke-checker.md delete mode 100644 src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/Microsoft.IO.Redist/.analyzerdata delete mode 100644 src/libraries/Microsoft.IO.Redist/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/Microsoft.Win32.SystemEvents/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Console/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp delete mode 100644 src/libraries/System.Data.Odbc/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp delete mode 100644 src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 delete mode 100644 src/libraries/System.Diagnostics.PerformanceCounter/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Diagnostics.Process/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp delete mode 100644 src/libraries/System.DirectoryServices.AccountManagement/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.DirectoryServices/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Drawing.Common/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Drawing.Primitives/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.IO.Compression.Brotli/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.IO.Compression/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.IO.Ports/src/PinvokeAnalyzerExceptionList.analyzerdata.netstandard delete mode 100644 src/libraries/System.Management/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp delete mode 100644 src/libraries/System.Net.Http/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Net.Sockets/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Reflection.Metadata/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp delete mode 100644 src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 delete mode 100644 src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.1 delete mode 100644 src/libraries/System.ServiceProcess.ServiceController/src/PinvokeAnalyzerExceptionList.analyzerdata delete mode 100644 src/libraries/System.Windows.Extensions/src/PinvokeAnalyzerExceptionList.analyzerdata diff --git a/docs/README.md b/docs/README.md index 26ad475c3ef9b..130c5fa144fcb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -58,7 +58,6 @@ Coding Guidelines - [Breaking Change Rules](coding-guidelines/breaking-change-rules.md) - [Project Guidelines](coding-guidelines/project-guidelines.md) - [Adding APIs Guidelines](coding-guidelines/adding-api-guidelines.md) -- [Legal Native calls](coding-guidelines/pinvoke-checker.md) Project Docs ================= diff --git a/docs/coding-guidelines/pinvoke-checker.md b/docs/coding-guidelines/pinvoke-checker.md deleted file mode 100644 index 17c2d05c2e3cd..0000000000000 --- a/docs/coding-guidelines/pinvoke-checker.md +++ /dev/null @@ -1,39 +0,0 @@ -# PInvoke Analyzer - -During the build of any product library in dotnet/runtime, we use a Roslyn code analyzer to look for disallowed native calls (PInvokes). When there is a violation, it will fail the build. To fix the build, either find an alternative to the PInvoke or baseline the failure temporarily. To baseline it, add the function name in the format `module!entrypoint` to a file named PInvokeAnalyzerExceptionList.analyzerdata in the same folder as the project. [Here](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.Process/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp) is an example. - -If you baseline a violation, please open an issue to fix it because the library likely cannot ship in this situation. It is better to not introduce the violation. We want to clean out any baselines. There are situations where a violation may be acceptable. One situation is where we are shipping the native implementation of the API. An example of this situation is `sni.dll` which is used by SqlClient. - -Each project is analyzed against one of two possible lists we maintain. - -## Legal UWP API's - -### Applies to -This applies to product libraries that are being built for use in a modern Windows app (aka UWP app, or app running on UAP). When building the `uap` configurations we will apply this check. If the library does not have a `uap` configuration explicitly listed in `Configuration.props` in the project folder, when targeting `uap` we will build the `netstandard` configuration, and apply this check. - -We do not currently apply this check to test binaries. Although when testing UWP libraries the tests must run within a test app, they do not need to pass through the store validation process. It is still possible they may call an API that does not work correctly within an app's security boundary and that call would have to be avoided. - -### Motivation -Not all PInvokes are legal within a UWP app. An allow-list is enforced when the Windows store ingests an app, and also in a build step in the Visual Studio build process for apps. If we produce a library for UWP use, any PInvokes it performs must be to API's that are on the allow-list or the app using the library will fail validation. - -### Implementation -To enforce this the analyzer consults the list [here](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.CodeAnalysis/PackageFiles/PinvokeAnalyzer_Win32UWPApis.txt). - -The analyzer is enabled by default in the configurations below by the setting of the MSBuild property `UWPCompatible`. We aim to make all our `netstandard` compliant libraries work within a UWP app, but in rare cases where a library cannot, the check can be disabled with `false` in the project file. - -There is also a more fine grained property `false` for temporary use. - -## Legal OneCore API's - -### Applies to -This applies to all other product libraries in all other configurations targeted at Windows. - -We do not currently apply this check to test binaries as they do not need to run on Windows Nano. - -### Motivation -.NET Core supports execution on Windows Nano, which has a reduced API surface area known as OneCore. To run on Windows Nano we cannot invoke any platform API that is not available on OneCore. - -### Implementation -To enforce this the analyzer consults the list [here](https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.CodeAnalysis/PackageFiles/PinvokeAnalyzer_Win32Apis.txt). - -The analyzer is enabled by default when building for Windows, not a test, and not building for UWP. We aim to make all such configurations OneCore compliant, but in the rare cases where a library cannot be, the check can be disabled with `false` in the project file. diff --git a/eng/CodeAnalysis.ruleset b/eng/CodeAnalysis.ruleset index e18275f097c78..76dafbee5b816 100644 --- a/eng/CodeAnalysis.ruleset +++ b/eng/CodeAnalysis.ruleset @@ -1,4 +1,12 @@  + + + + + + + + diff --git a/src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata b/src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index e1c58c0c50381..0000000000000 --- a/src/coreclr/src/System.Private.CoreLib/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,10 +0,0 @@ - -normaliz.dll!IsNormalizedString -normaliz.dll!NormalizeString - - -user32.dll!GetProcessWindowStation -user32.dll!GetUserObjectInformationW - - -kernel32.dll!GetGeoInfo \ No newline at end of file diff --git a/src/libraries/Common/src/Interop/Interop.HostPolicy.cs b/src/libraries/Common/src/Interop/Interop.HostPolicy.cs index b57f75ad46c02..6501e5663a56c 100644 --- a/src/libraries/Common/src/Interop/Interop.HostPolicy.cs +++ b/src/libraries/Common/src/Interop/Interop.HostPolicy.cs @@ -16,15 +16,11 @@ internal delegate void corehost_resolve_component_dependencies_result_fn(string [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Auto)] internal delegate void corehost_error_writer_fn(string message); -#pragma warning disable BCL0015 // Disable Pinvoke analyzer errors. - [DllImport(Libraries.HostPolicy, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] internal static extern int corehost_resolve_component_dependencies(string componentMainAssemblyPath, corehost_resolve_component_dependencies_result_fn result); [DllImport(Libraries.HostPolicy, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)] internal static extern IntPtr corehost_set_error_writer(IntPtr errorWriter); - -#pragma warning restore } } diff --git a/src/libraries/Microsoft.IO.Redist/.analyzerdata b/src/libraries/Microsoft.IO.Redist/.analyzerdata deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/src/libraries/Microsoft.IO.Redist/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/Microsoft.IO.Redist/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index c806e003bba0c..0000000000000 --- a/src/libraries/Microsoft.IO.Redist/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,29 +0,0 @@ -advapi32.dll!EncryptFileW -advapi32.dll!DecryptFileW -BCrypt.dll!BCryptGenRandom -kernel32.dll!CloseHandle -kernel32.dll!ReplaceFileW -kernel32.dll!MoveFileExW -kernel32.dll!DeleteFileW -kernel32.dll!GetFileAttributesExW -kernel32.dll!GetVolumeInformationW -kernel32.dll!CreateDirectoryW -kernel32.dll!FindNextFileW -kernel32.dll!DeleteVolumeMountPointW -kernel32.dll!GetLogicalDrives -kernel32.dll!SetFileInformationByHandle -kernel32.dll!CreateFileW -kernel32.dll!RemoveDirectoryW -kernel32.dll!SetFileAttributesW -kernel32.dll!CopyFileExW -kernel32.dll!FindFirstFileExW -kernel32.dll!SetThreadErrorMode -kernel32.dll!GetTempFileNameW -kernel32.dll!GetLongPathNameW -kernel32.dll!GetTempPathW -kernel32.dll!GetFullPathNameW -kernel32.dll!FindClose -kernel32.dll!FormatMessageW -ntdll.dll!NtQueryDirectoryFile -ntdll.dll!NtCreateFile -ntdll.dll!RtlNtStatusToDosError diff --git a/src/libraries/Microsoft.Win32.SystemEvents/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/Microsoft.Win32.SystemEvents/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index cfa190d52bda7..0000000000000 --- a/src/libraries/Microsoft.Win32.SystemEvents/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,27 +0,0 @@ -kernel32.dll!GetModuleHandleW -kernel32.dll!LoadLibrary -user32.dll!CreateWindowExW -user32.dll!DefWindowProcW -user32.dll!DestroyWindow -user32.dll!DispatchMessageW -user32.dll!GetClassInfoW -user32.dll!GetProcessWindowStation -user32.dll!GetUserObjectInformationW -user32.dll!GetWindowThreadProcessId -user32.dll!IsWindow -user32.dll!KillTimer -user32.dll!MsgWaitForMultipleObjectsEx -user32.dll!PeekMessageW -user32.dll!PostMessageW -user32.dll!RegisterClassW -user32.dll!RegisterWindowMessageW -user32.dll!SendMessageW -user32.dll!SetClassLongPtrW -user32.dll!SetClassLongW -user32.dll!SetTimer -user32.dll!SetWindowLongPtrW -user32.dll!SetWindowLongW -user32.dll!TranslateMessage -user32.dll!UnregisterClassW -wtsapi32.dll!WTSRegisterSessionNotification -wtsapi32.dll!WTSUnRegisterSessionNotification diff --git a/src/libraries/System.Console/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp b/src/libraries/System.Console/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp deleted file mode 100644 index 2e448cefb0928..0000000000000 --- a/src/libraries/System.Console/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp +++ /dev/null @@ -1,2 +0,0 @@ -# Windows are adding to OneCore -user32.dll!GetKeyState \ No newline at end of file diff --git a/src/libraries/System.Data.Odbc/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Data.Odbc/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index 954cabafecae1..0000000000000 --- a/src/libraries/System.Data.Odbc/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,45 +0,0 @@ - -odbc32.dll!SQLAllocHandle -odbc32.dll!SQLBindCol -odbc32.dll!SQLBindCol -odbc32.dll!SQLBindParameter -odbc32.dll!SQLCloseCursor -odbc32.dll!SQLCancel -odbc32.dll!SQLColAttributeW -odbc32.dll!SQLColumnsW -odbc32.dll!SQLDisconnect -odbc32.dll!SQLDriverConnectW -odbc32.dll!SQLEndTran -odbc32.dll!SQLExecDirectW -odbc32.dll!SQLExecute -odbc32.dll!SQLFetch -odbc32.dll!SQLFreeStmt -odbc32.dll!SQLGetConnectAttrW -odbc32.dll!SQLFreeHandle -odbc32.dll!SQLGetData -odbc32.dll!SQLGetDescFieldW -odbc32.dll!SQLGetDiagRecW -odbc32.dll!SQLGetDiagFieldW -odbc32.dll!SQLGetFunctions -odbc32.dll!SQLGetInfoW -odbc32.dll!SQLGetInfoW -odbc32.dll!SQLGetStmtAttrW -odbc32.dll!SQLGetTypeInfo -odbc32.dll!SQLMoreResults -odbc32.dll!SQLNumResultCols -odbc32.dll!SQLPrepareW -odbc32.dll!SQLPrimaryKeysW -odbc32.dll!SQLProcedureColumnsW -odbc32.dll!SQLProceduresW -odbc32.dll!SQLRowCount -odbc32.dll!SQLSetConnectAttrW -odbc32.dll!SQLSetConnectAttrW -odbc32.dll!SQLSetConnectAttrW -odbc32.dll!SQLSetConnectAttrW -odbc32.dll!SQLSetDescFieldW -odbc32.dll!SQLSetDescFieldW -odbc32.dll!SQLSetEnvAttr -odbc32.dll!SQLSetStmtAttrW -odbc32.dll!SQLSpecialColumnsW -odbc32.dll!SQLStatisticsW -odbc32.dll!SQLTablesW \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index d9aba2e39deb7..0000000000000 --- a/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,45 +0,0 @@ -kernel32.dll!CreateFile -kernel32.dll!FormatMessage -advapi32.dll!ClearEventLog -advapi32.dll!CloseEventLog -advapi32.dll!GetNumberOfEventLogRecords -advapi32.dll!GetOldestEventLogRecord -advapi32.dll!NotifyChangeEventLog -advapi32.dll!OpenEventLog -advapi32.dll!ReadEventLog -advapi32.dll!ReportEvent -advapi32.dll!RegisterEventSource -wevtapi.dll!EvtQuery -wevtapi.dll!EvtSeek -wevtapi.dll!EvtSubscribe -wevtapi.dll!EvtNext -wevtapi.dll!EvtCancel -wevtapi.dll!EvtGetEventInfo -wevtapi.dll!EvtClose -wevtapi.dll!EvtGetQueryInfo -wevtapi.dll!EvtOpenPublisherMetadata -wevtapi.dll!EvtGetPublisherMetadataProperty -wevtapi.dll!EvtGetObjectArraySize -wevtapi.dll!EvtGetObjectArrayProperty -wevtapi.dll!EvtOpenEventMetadataEnum -wevtapi.dll!EvtNextEventMetadata -wevtapi.dll!EvtGetEventMetadataProperty -wevtapi.dll!EvtOpenChannelEnum -wevtapi.dll!EvtNextChannelPath -wevtapi.dll!EvtOpenPublisherEnum -wevtapi.dll!EvtNextPublisherId -wevtapi.dll!EvtOpenChannelConfig -wevtapi.dll!EvtSaveChannelConfig -wevtapi.dll!EvtSetChannelConfigProperty -wevtapi.dll!EvtGetChannelConfigProperty -wevtapi.dll!EvtOpenLog -wevtapi.dll!EvtGetLogInfo -wevtapi.dll!EvtExportLog -wevtapi.dll!EvtArchiveExportedLog -wevtapi.dll!EvtClearLog -wevtapi.dll!EvtCreateRenderContext -wevtapi.dll!EvtRender -wevtapi.dll!EvtFormatMessage -wevtapi.dll!EvtOpenSession -wevtapi.dll!EvtUpdateBookmark -wevtapi.dll!EvtCreateBookmark diff --git a/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp b/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp deleted file mode 100644 index afae65bd2709b..0000000000000 --- a/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp +++ /dev/null @@ -1,7 +0,0 @@ -advapi32.dll!ClearEventLog -advapi32.dll!CloseEventLog -advapi32.dll!GetNumberOfEventLogRecords -advapi32.dll!GetOldestEventLogRecord -advapi32.dll!NotifyChangeEventLog -advapi32.dll!OpenEventLog -advapi32.dll!ReadEventLog \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 b/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 deleted file mode 100644 index afae65bd2709b..0000000000000 --- a/src/libraries/System.Diagnostics.EventLog/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 +++ /dev/null @@ -1,7 +0,0 @@ -advapi32.dll!ClearEventLog -advapi32.dll!CloseEventLog -advapi32.dll!GetNumberOfEventLogRecords -advapi32.dll!GetOldestEventLogRecord -advapi32.dll!NotifyChangeEventLog -advapi32.dll!OpenEventLog -advapi32.dll!ReadEventLog \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.PerformanceCounter/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Diagnostics.PerformanceCounter/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index 65be021301f53..0000000000000 --- a/src/libraries/System.Diagnostics.PerformanceCounter/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,3 +0,0 @@ -advapi32.dll!ConvertStringSecurityDescriptorToSecurityDescriptor -kernel32.dll!LoadLibrary -perfcounter.dll!FormatFromRawValue \ No newline at end of file diff --git a/src/libraries/System.Diagnostics.Process/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp b/src/libraries/System.Diagnostics.Process/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp deleted file mode 100644 index efb577d99cdeb..0000000000000 --- a/src/libraries/System.Diagnostics.Process/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp +++ /dev/null @@ -1,12 +0,0 @@ -# Not available in OneCore: we fall back gracefully on Nano because -# stub APIs are present and our tests currently don't use actual windows -shell32.dll!ShellExecuteExW -user32.dll!EnumWindows -user32.dll!GetWindow -user32.dll!GetWindowLongW -user32.dll!GetWindowTextLengthW -user32.dll!GetWindowTextW -user32.dll!GetWindowThreadProcessId -user32.dll!IsWindowVisible -user32.dll!PostMessageW -user32.dll!WaitForInputIdle \ No newline at end of file diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.DirectoryServices.AccountManagement/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index 6aacd75e95c61..0000000000000 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,4 +0,0 @@ -# not available in OneCore -activeds.dll!ADsOpenObject -advapi32.dll!LsaNtStatusToWinError -credui.dll!CredUIParseUserNameW diff --git a/src/libraries/System.DirectoryServices/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.DirectoryServices/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index 9111efa58d8c2..0000000000000 --- a/src/libraries/System.DirectoryServices/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,27 +0,0 @@ -activeds.dll!ADsEncodeBinaryData -activeds.dll!ADsGetLastError -activeds.dll!ADsOpenObject -activeds.dll!ADsSetLastError -activeds.dll!FreeADsMem -advapi32.dll!LsaCreateTrustedDomainEx -advapi32.dll!LsaDeleteTrustedDomain -advapi32.dll!LsaNtStatusToWinError -advapi32.dll!LsaOpenTrustedDomainByName -advapi32.dll!LsaQueryForestTrustInformation -advapi32.dll!LsaQueryTrustedDomainInfoByName -advapi32.dll!LsaSetForestTrustInformation -advapi32.dll!LsaSetTrustedDomainInfoByName -netapi32.dll!DsEnumerateDomainTrustsW -netapi32.dll!DsGetDcCloseW -netapi32.dll!DsGetDcNameW -netapi32.dll!DsGetDcNextW -netapi32.dll!DsGetDcOpenW -netapi32.dll!DsGetSiteNameW -netapi32.dll!DsRoleFreeMemory -netapi32.dll!DsRoleGetPrimaryDomainInformation -netapi32.dll!I_NetLogonControl2 -netapi32.dll!NetApiBufferFree -secur32.dll!LsaCallAuthenticationPackage -secur32.dll!LsaConnectUntrusted -secur32.dll!LsaDeregisterLogonProcess -secur32.dll!LsaFreeReturnBuffer \ No newline at end of file diff --git a/src/libraries/System.Drawing.Common/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Drawing.Common/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index dc4eb46b529dd..0000000000000 --- a/src/libraries/System.Drawing.Common/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,55 +0,0 @@ -comdlg32.dll!PrintDlg -comdlg32.dll!PrintDlg -gdi32.dll!AbortDoc -gdi32.dll!AddFontResourceEx -gdi32.dll!BitBlt -gdi32.dll!CombineRgn -gdi32.dll!CreateCompatibleBitmap -gdi32.dll!CreateCompatibleDC -gdi32.dll!CreateDCW -gdi32.dll!CreateDIBSection -gdi32.dll!CreateFontIndirectW -gdi32.dll!CreateICW -gdi32.dll!CreateRectRgn -gdi32.dll!DeleteDC -gdi32.dll!DeleteObject -gdi32.dll!EndDoc -gdi32.dll!EndPage -gdi32.dll!ExtEscape -gdi32.dll!ExtEscape -gdi32.dll!GetClipRgn -gdi32.dll!GetCurrentObject -gdi32.dll!GetDeviceCaps -gdi32.dll!GetDIBits -gdi32.dll!GetObject -gdi32.dll!GetObjectType -gdi32.dll!GetPaletteEntries -gdi32.dll!GetRgnBox -gdi32.dll!GetStockObject -gdi32.dll!IntersectClipRect -gdi32.dll!OffsetViewportOrgEx -gdi32.dll!ResetDC -gdi32.dll!RestoreDC -gdi32.dll!SaveDC -gdi32.dll!SelectClipRgn -gdi32.dll!SelectObject -gdi32.dll!StartDoc -gdi32.dll!StartPage -kernel32.dll!RtlMoveMemory -shell32.dll!ExtractAssociatedIcon -user32.dll!CopyImage -user32.dll!CreateIconFromResourceEx -user32.dll!DestroyIcon -user32.dll!DrawIconEx -user32.dll!GetDC -user32.dll!GetDC -user32.dll!GetIconInfo -user32.dll!GetSysColor -user32.dll!GetSystemMetrics -user32.dll!LoadIcon -user32.dll!ReleaseDC -user32.dll!SystemParametersInfoW -user32.dll!WindowFromDC -winspool.drv!DeviceCapabilities -winspool.drv!DocumentProperties -winspool.drv!EnumPrinters diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs index 136f38094bdf3..93b043834d1c6 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.Windows.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable BCL0015 // We know these APIs are only on Windows - using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Drawing.Internal; diff --git a/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.cs b/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.cs index 98aadfa2be2e3..5fdb004fef800 100644 --- a/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.cs +++ b/src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.cs @@ -2,8 +2,6 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -#pragma warning disable BCL0015 - using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Drawing.Text; diff --git a/src/libraries/System.Drawing.Primitives/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Drawing.Primitives/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index f34a4770cf6e2..0000000000000 --- a/src/libraries/System.Drawing.Primitives/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1 +0,0 @@ -user32.dll!GetSysColor diff --git a/src/libraries/System.IO.Compression.Brotli/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.IO.Compression.Brotli/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index f86667937a6f8..0000000000000 --- a/src/libraries/System.IO.Compression.Brotli/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,23 +0,0 @@ - -clrcompression.dll!BrotliDecoderCreateInstance -clrcompression.dll!BrotliDecoderDecompress -clrcompression.dll!BrotliDecoderDecompressStream -clrcompression.dll!BrotliDecoderDestroyInstance -clrcompression.dll!BrotliDecoderErrorString -clrcompression.dll!BrotliDecoderGetErrorCode -clrcompression.dll!BrotliDecoderHasMoreOutput -clrcompression.dll!BrotliDecoderIsFinished -clrcompression.dll!BrotliDecoderIsUsed -clrcompression.dll!BrotliDecoderSetParameter -clrcompression.dll!BrotliDecoderTakeOutput -clrcompression.dll!BrotliDecoderVersion -clrcompression.dll!BrotliEncoderCompress -clrcompression.dll!BrotliEncoderCompressStream -clrcompression.dll!BrotliEncoderCreateInstance -clrcompression.dll!BrotliEncoderDestroyInstance -clrcompression.dll!BrotliEncoderHasMoreOutput -clrcompression.dll!BrotliEncoderIsFinished -clrcompression.dll!BrotliEncoderMaxCompressedSize -clrcompression.dll!BrotliEncoderSetParameter -clrcompression.dll!BrotliEncoderTakeOutput -clrcompression.dll!BrotliEncoderVersion diff --git a/src/libraries/System.IO.Compression/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.IO.Compression/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index e770dfd692fb3..0000000000000 --- a/src/libraries/System.IO.Compression/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,8 +0,0 @@ - -clrcompression.dll!CompressionNative_Crc32 -clrcompression.dll!CompressionNative_Deflate -clrcompression.dll!CompressionNative_DeflateEnd -clrcompression.dll!CompressionNative_DeflateInit2_ -clrcompression.dll!CompressionNative_Inflate -clrcompression.dll!CompressionNative_InflateEnd -clrcompression.dll!CompressionNative_InflateInit2_ diff --git a/src/libraries/System.IO.Ports/src/PinvokeAnalyzerExceptionList.analyzerdata.netstandard b/src/libraries/System.IO.Ports/src/PinvokeAnalyzerExceptionList.analyzerdata.netstandard deleted file mode 100644 index a60530e769350..0000000000000 --- a/src/libraries/System.IO.Ports/src/PinvokeAnalyzerExceptionList.analyzerdata.netstandard +++ /dev/null @@ -1,2 +0,0 @@ -# not available in OneCore -kernel32.dll!CreateFileW diff --git a/src/libraries/System.Management/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp b/src/libraries/System.Management/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp deleted file mode 100644 index a6ed64c19d4ea..0000000000000 --- a/src/libraries/System.Management/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp +++ /dev/null @@ -1 +0,0 @@ -kernel32.dll!LoadLibrary \ No newline at end of file diff --git a/src/libraries/System.Net.Http/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Net.Http/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index 37203114ff9a8..0000000000000 --- a/src/libraries/System.Net.Http/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,2 +0,0 @@ - -msquic.dll!MsQuicOpen diff --git a/src/libraries/System.Net.Sockets/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Net.Sockets/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index e41642f9e083a..0000000000000 --- a/src/libraries/System.Net.Sockets/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1 +0,0 @@ -ws2_32.dll!WSADuplicateSocket \ No newline at end of file diff --git a/src/libraries/System.Reflection.Metadata/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Reflection.Metadata/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index ad69b5fe14fae..0000000000000 --- a/src/libraries/System.Reflection.Metadata/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1 +0,0 @@ -kernel32.dll!ReadFile \ No newline at end of file diff --git a/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp b/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp deleted file mode 100644 index 6012e5aa021e9..0000000000000 --- a/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp +++ /dev/null @@ -1 +0,0 @@ -advapi32.dll!LsaNtStatusToWinError \ No newline at end of file diff --git a/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 b/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 deleted file mode 100644 index 6012e5aa021e9..0000000000000 --- a/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.0 +++ /dev/null @@ -1 +0,0 @@ -advapi32.dll!LsaNtStatusToWinError \ No newline at end of file diff --git a/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.1 b/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.1 deleted file mode 100644 index 6aad19cc39ff7..0000000000000 --- a/src/libraries/System.Security.Principal.Windows/src/PinvokeAnalyzerExceptionList.analyzerdata.netcoreapp2.1 +++ /dev/null @@ -1 +0,0 @@ -advapi32.dll!LsaNtStatusToWinError diff --git a/src/libraries/System.ServiceProcess.ServiceController/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.ServiceProcess.ServiceController/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index f4f41920f718d..0000000000000 --- a/src/libraries/System.ServiceProcess.ServiceController/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,2 +0,0 @@ -advapi32.dll!RegisterServiceCtrlHandlerEx -advapi32.dll!StartServiceCtrlDispatcher \ No newline at end of file diff --git a/src/libraries/System.Windows.Extensions/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Windows.Extensions/src/PinvokeAnalyzerExceptionList.analyzerdata deleted file mode 100644 index 2e702d32ace5c..0000000000000 --- a/src/libraries/System.Windows.Extensions/src/PinvokeAnalyzerExceptionList.analyzerdata +++ /dev/null @@ -1,9 +0,0 @@ -cryptui.dll!CryptUIDlgViewCertificateW -cryptui.dll!CryptUIDlgSelectCertificateW -user32.dll!MessageBeep -winmm.dll!mmioAscend -winmm.dll!mmioDescend -winmm.dll!mmioClose -winmm.dll!mmioOpen -winmm.dll!mmioRead -winmm.dll!PlaySoundW diff --git a/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj index 20b1a389b2c1a..6c3acdd954b42 100644 --- a/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -9,7 +9,6 @@ false false $(NetCoreAppCurrent) - false Portable