{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/17905","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/17905/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/17905/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/17905/events","html_url":"https://github.com/dotnet/corefx/issues/17905","id":219402729,"number":17905,"title":"Clean up dead code","user":{"login":"ericstj","id":8918108,"avatar_url":"https://avatars3.githubusercontent.com/u/8918108?v=4","gravatar_id":"","url":"https://api.github.com/users/ericstj","html_url":"https://github.com/ericstj","followers_url":"https://api.github.com/users/ericstj/followers","following_url":"https://api.github.com/users/ericstj/following{/other_user}","gists_url":"https://api.github.com/users/ericstj/gists{/gist_id}","starred_url":"https://api.github.com/users/ericstj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericstj/subscriptions","organizations_url":"https://api.github.com/users/ericstj/orgs","repos_url":"https://api.github.com/users/ericstj/repos","events_url":"https://api.github.com/users/ericstj/events{/privacy}","received_events_url":"https://api.github.com/users/ericstj/received_events","type":"User","site_admin":false},"labels":[{"id":158885797,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-Meta","name":"area-Meta","color":"d4c5f9","default":false},{"id":507384542,"url":"https://api.github.com/repos/dotnet/corefx/labels/easy","name":"easy","color":"90eeff","default":false},{"id":145399957,"url":"https://api.github.com/repos/dotnet/corefx/labels/enhancement","name":"enhancement","color":"207de5","default":true},{"id":145399958,"url":"https://api.github.com/repos/dotnet/corefx/labels/up-for-grabs","name":"up-for-grabs","color":"159818","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/5","html_url":"https://github.com/dotnet/corefx/milestone/5","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/5/labels","id":1328080,"number":5,"title":"Future","description":"Milestone tracking issues not triaged to a planned release. Work in this milestone may happen, or may not: it is not committed.","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars1.githubusercontent.com/u/1302850?v=4","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":2002,"closed_issues":110,"state":"open","created_at":"2015-09-29T00:25:45Z","updated_at":"2018-03-29T17:56:59Z","due_on":null,"closed_at":null},"comments":126,"created_at":"2017-04-04T22:22:32Z","updated_at":"2018-03-29T18:12:23Z","closed_at":null,"author_association":"MEMBER","body":"After enabling the mono linker for our .NETCoreApp binaries it has identified a number of places where we have dead code.\r\n\r\nThese fall into 3 categories.\r\n1. Truly dead code that isn't used anywhere in the assembly.\r\n    - This can be deleted\r\n2. Source files that are used in one build of the assembly, but not all.  Common source files where some project uses the source, but not all.\r\n    - These can be better factored, split up to provide minimal source where needed. Or, they may contain truly dead code.\r\n3. Compile time only source.  Internal constants that are represented as literals in calling IL and not exposed publicly.\r\n    - These must remain.\r\n\r\n### diffs\r\n- [ ] [Microsoft.CSharp](http://tempcoverage.blob.core.windows.net/report2/Microsoft.CSharp.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/Microsoft.CSharp.diff.csv))\r\n- [ ] [Microsoft.VisualBasic](http://tempcoverage.blob.core.windows.net/report2/Microsoft.VisualBasic.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/Microsoft.VisualBasic.diff.csv))\r\n- [x] [System.Collections.Concurrent](http://tempcoverage.blob.core.windows.net/report2/System.Collections.Concurrent.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Collections.Concurrent.diff.csv))\r\n- [x] [System.Collections](http://tempcoverage.blob.core.windows.net/report2/System.Collections.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Collections.diff.csv)) - PR #19140 by @YoupHulsebos\r\n- [x] [System.Collections.Immutable](http://tempcoverage.blob.core.windows.net/report2/System.Collections.Immutable.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Collections.Immutable.diff.csv)) - Nothing to remove by @YoupHulsebos in https://github.com/dotnet/corefx/issues/17905#issuecomment-298154133\r\n- [x] [System.Collections.NonGeneric](http://tempcoverage.blob.core.windows.net/report2/System.Collections.NonGeneric.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Collections.NonGeneric.diff.csv)) - Nothing to remove by @YoupHulsebos in https://github.com/dotnet/corefx/issues/17905#issuecomment-298154133\r\n- [x] [System.Collections.Specialized](http://tempcoverage.blob.core.windows.net/report2/System.Collections.Specialized.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Collections.Specialized.diff.csv))\r\n- [x] [System.ComponentModel.Annotations](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.Annotations.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.Annotations.diff.csv)) @norek\r\n- [x] [System.ComponentModel](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.diff.csv))@norek\r\n- [x] [System.ComponentModel.EventBasedAsync](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.EventBasedAsync.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.EventBasedAsync.diff.csv))@norek\r\n- [x] [System.ComponentModel.Primitives](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.Primitives.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.Primitives.diff.csv))@norek\r\n- [x] [System.ComponentModel.TypeConverter](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.TypeConverter.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.ComponentModel.TypeConverter.diff.csv))@norek\r\n- [x] [System.Console](http://tempcoverage.blob.core.windows.net/report2/System.Console.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Console.diff.csv))\r\n- [x] [System.Data.Common](http://tempcoverage.blob.core.windows.net/report2/System.Data.Common.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Data.Common.diff.csv)) - Fixed in #19141 by @YoupHulsebos\r\n- [x] [System.Diagnostics.Debug](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Debug.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Debug.diff.csv))\r\n- [x] [System.Diagnostics.DiagnosticSource](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.DiagnosticSource.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.DiagnosticSource.diff.csv))\r\n- [x] [System.Diagnostics.FileVersionInfo](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.FileVersionInfo.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.FileVersionInfo.diff.csv))\r\n- [x] [System.Diagnostics.Process](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Process.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Process.diff.csv))\r\n- [x] [System.Diagnostics.StackTrace](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.StackTrace.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.StackTrace.diff.csv))\r\n- [x] [System.Diagnostics.TextWriterTraceListener](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.TextWriterTraceListener.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.TextWriterTraceListener.diff.csv))\r\n- [x] [System.Diagnostics.Tools](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Tools.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Tools.diff.csv))\r\n- [x] [System.Diagnostics.TraceSource](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.TraceSource.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.TraceSource.diff.csv))\r\n- [x] [System.Diagnostics.Tracing](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Tracing.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Diagnostics.Tracing.diff.csv))\r\n- [x] [System.Drawing.Primitives](http://tempcoverage.blob.core.windows.net/report2/System.Drawing.Primitives.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Drawing.Primitives.diff.csv))\r\n- [ ] [System.IO.Compression](http://tempcoverage.blob.core.windows.net/report2/System.IO.Compression.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.Compression.diff.csv))\r\n- [x] [System.IO.Compression.ZipFile](http://tempcoverage.blob.core.windows.net/report2/System.IO.Compression.ZipFile.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.Compression.ZipFile.diff.csv))\r\n- [ ] [System.IO.FileSystem.AccessControl](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.AccessControl.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.AccessControl.diff.csv))\r\n- [ ] [System.IO.FileSystem](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.diff.csv))\r\n- [x] [System.IO.FileSystem.DriveInfo](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.DriveInfo.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.DriveInfo.diff.csv))\r\n- [x] [System.IO.FileSystem.Watcher](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.Watcher.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.FileSystem.Watcher.diff.csv))\r\n- [x] [System.IO.IsolatedStorage](http://tempcoverage.blob.core.windows.net/report2/System.IO.IsolatedStorage.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.IsolatedStorage.diff.csv))\r\n- [x] [System.IO.MemoryMappedFiles](http://tempcoverage.blob.core.windows.net/report2/System.IO.MemoryMappedFiles.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.MemoryMappedFiles.diff.csv))\r\n- [x] [System.IO.Pipes](http://tempcoverage.blob.core.windows.net/report2/System.IO.Pipes.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.IO.Pipes.diff.csv))\r\n- [x] [System.Linq](http://tempcoverage.blob.core.windows.net/report2/System.Linq.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Linq.diff.csv)) - Nothing to remove, https://github.com/dotnet/corefx/issues/17905#issuecomment-294286344 by @JonHanna\r\n- [x] [System.Linq.Expressions](http://tempcoverage.blob.core.windows.net/report2/System.Linq.Expressions.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Linq.Expressions.diff.csv))\r\n- [x] [System.Linq.Parallel](http://tempcoverage.blob.core.windows.net/report2/System.Linq.Parallel.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Linq.Parallel.diff.csv)) - Fixed in #19143 by @YoupHulsebos\r\n- [x] [System.Linq.Queryable](http://tempcoverage.blob.core.windows.net/report2/System.Linq.Queryable.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Linq.Queryable.diff.csv)) - Nothing to remove - https://github.com/dotnet/corefx/issues/17905#issuecomment-294286344 by @JonHanna\r\n- [ ] [System.Net.Http](http://tempcoverage.blob.core.windows.net/report2/System.Net.Http.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Http.diff.csv))\r\n- [ ] [System.Net.HttpListener](http://tempcoverage.blob.core.windows.net/report2/System.Net.HttpListener.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.HttpListener.diff.csv))\r\n- [x] [System.Net.Mail](http://tempcoverage.blob.core.windows.net/report2/System.Net.Mail.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Mail.diff.csv)) - Fixed in #19532 by @Ermiar\r\n- [x] [System.Net.NameResolution](http://tempcoverage.blob.core.windows.net/report2/System.Net.NameResolution.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.NameResolution.diff.csv))\r\n- [ ] [System.Net.NetworkInformation](http://tempcoverage.blob.core.windows.net/report2/System.Net.NetworkInformation.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.NetworkInformation.diff.csv))\r\n- [x] [System.Net.Ping](http://tempcoverage.blob.core.windows.net/report2/System.Net.Ping.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Ping.diff.csv))\r\n- [ ] [System.Net.Primitives](http://tempcoverage.blob.core.windows.net/report2/System.Net.Primitives.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Primitives.diff.csv))\r\n- [ ] [System.Net.Requests](http://tempcoverage.blob.core.windows.net/report2/System.Net.Requests.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Requests.diff.csv))\r\n- [ ] [System.Net.Security](http://tempcoverage.blob.core.windows.net/report2/System.Net.Security.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Security.diff.csv))\r\n- [x] [System.Net.ServicePoint](http://tempcoverage.blob.core.windows.net/report2/System.Net.ServicePoint.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.ServicePoint.diff.csv))\r\n- [ ] [System.Net.Sockets](http://tempcoverage.blob.core.windows.net/report2/System.Net.Sockets.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.Sockets.diff.csv))\r\n- [ ] [System.Net.WebClient](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebClient.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebClient.diff.csv))\r\n- [ ] [System.Net.WebHeaderCollection](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebHeaderCollection.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebHeaderCollection.diff.csv))\r\n- [x] [System.Net.WebProxy](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebProxy.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebProxy.diff.csv))\r\n- [ ] [System.Net.WebSockets.Client](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebSockets.Client.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebSockets.Client.diff.csv))\r\n- [ ] [System.Net.WebSockets](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebSockets.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Net.WebSockets.diff.csv))\r\n- [x] [System.Numerics.Vectors](http://tempcoverage.blob.core.windows.net/report2/System.Numerics.Vectors.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Numerics.Vectors.diff.csv))\r\n- [x] [System.ObjectModel](http://tempcoverage.blob.core.windows.net/report2/System.ObjectModel.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.ObjectModel.diff.csv))\r\n- [ ] [System.Private.DataContractSerialization](http://tempcoverage.blob.core.windows.net/report2/System.Private.DataContractSerialization.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Private.DataContractSerialization.diff.csv))\r\n- [ ] [System.Private.Uri](http://tempcoverage.blob.core.windows.net/report2/System.Private.Uri.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Private.Uri.diff.csv))\r\n- [x] [System.Private.Xml](http://tempcoverage.blob.core.windows.net/report2/System.Private.Xml.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Private.Xml.diff.csv))\r\n- [x] [System.Private.Xml.Linq](http://tempcoverage.blob.core.windows.net/report2/System.Private.Xml.Linq.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Private.Xml.Linq.diff.csv))\r\n- [x] [System.Reflection.DispatchProxy](http://tempcoverage.blob.core.windows.net/report2/System.Reflection.DispatchProxy.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Reflection.DispatchProxy.diff.csv))\r\n- [x] [System.Reflection.Metadata](http://tempcoverage.blob.core.windows.net/report2/System.Reflection.Metadata.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Reflection.Metadata.diff.csv))\r\n- [x] [System.Reflection.TypeExtensions](http://tempcoverage.blob.core.windows.net/report2/System.Reflection.TypeExtensions.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Reflection.TypeExtensions.diff.csv))\r\n- [x] [System.Resources.Writer](http://tempcoverage.blob.core.windows.net/report2/System.Resources.Writer.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Resources.Writer.diff.csv))\r\n- [x] [System.Runtime.CompilerServices.VisualC](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.CompilerServices.VisualC.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.CompilerServices.VisualC.diff.csv))\r\n- [ ] [System.Runtime](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.diff.csv))\r\n- [x] [System.Runtime.Extensions](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Extensions.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Extensions.diff.csv))\r\n- [x] [System.Runtime.InteropServices](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.InteropServices.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.InteropServices.diff.csv))\r\n- [x] [System.Runtime.InteropServices.RuntimeInformation](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.InteropServices.RuntimeInformation.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.InteropServices.RuntimeInformation.diff.csv))\r\n- [x] [System.Runtime.Numerics](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Numerics.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Numerics.diff.csv))\r\n- [x] [System.Runtime.Serialization.Formatters](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Serialization.Formatters.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Serialization.Formatters.diff.csv)) - Fixed in #19148 by @yaelkeemink\r\n- [ ] [System.Runtime.Serialization.Primitives](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Serialization.Primitives.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Runtime.Serialization.Primitives.diff.csv))\r\n- [ ] [System.Security.AccessControl](http://tempcoverage.blob.core.windows.net/report2/System.Security.AccessControl.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.AccessControl.diff.csv))\r\n- [ ] [System.Security.Claims](http://tempcoverage.blob.core.windows.net/report2/System.Security.Claims.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Claims.diff.csv))\r\n- [ ] [System.Security.Cryptography.Algorithms](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Algorithms.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Algorithms.diff.csv)) @mccbraxton\r\n- [ ] [System.Security.Cryptography.Cng](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Cng.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Cng.diff.csv))\r\n- [ ] [System.Security.Cryptography.Csp](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Csp.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Csp.diff.csv))\r\n- [ ] [System.Security.Cryptography.Encoding](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Encoding.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Encoding.diff.csv))\r\n- [ ] [System.Security.Cryptography.OpenSsl](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.OpenSsl.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.OpenSsl.diff.csv))\r\n- [x] [System.Security.Cryptography.Primitives](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Primitives.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.Primitives.diff.csv))\r\n- [x] [System.Security.Cryptography.X509Certificates](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.X509Certificates.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Cryptography.X509Certificates.diff.csv)) - Fixed in #19144 by @yaelkeemink \r\n- [x] [System.Security.Principal](http://tempcoverage.blob.core.windows.net/report2/System.Security.Principal.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Principal.diff.csv)) - Nothing to remove\r\n- [x] [Microsoft.Win32.Primitives](http://tempcoverage.blob.core.windows.net/report2/Microsoft.Win32.Primitives.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/Microsoft.Win32.Primitives.diff.csv))\r\n- [x] [Microsoft.Win32.Registry](http://tempcoverage.blob.core.windows.net/report2/Microsoft.Win32.Registry.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/Microsoft.Win32.Registry.diff.csv))\r\n- [ ] [Microsoft.XmlSerializer.Generator](http://tempcoverage.blob.core.windows.net/report2/Microsoft.XmlSerializer.Generator.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/Microsoft.XmlSerializer.Generator.diff.csv))\r\n- [x] [System.Security.Principal.Windows](http://tempcoverage.blob.core.windows.net/report2/System.Security.Principal.Windows.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Security.Principal.Windows.diff.csv)) - #18267\r\n- [x] [System.Text.RegularExpressions](http://tempcoverage.blob.core.windows.net/report2/System.Text.RegularExpressions.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Text.RegularExpressions.diff.csv)) - #18134 \r\n- [x] [System.Threading](http://tempcoverage.blob.core.windows.net/report2/System.Threading.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Threading.diff.csv)) - #18134 \r\n- [x] [System.Threading.Overlapped](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Overlapped.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Overlapped.diff.csv)) - #18134 \r\n- [x] [System.Threading.Tasks.Dataflow](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Tasks.Dataflow.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Tasks.Dataflow.diff.csv)) - #17998\r\n- [x] [System.Threading.Tasks.Extensions](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Tasks.Extensions.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Tasks.Extensions.diff.csv)) - Nothing to remove\r\n- [x] [System.Threading.Tasks.Parallel](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Tasks.Parallel.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Tasks.Parallel.diff.csv)) - Nothing to remove\r\n- [x] [System.Threading.Thread](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Thread.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Threading.Thread.diff.csv))  - Nothing to remove\r\n- [x] [System.Transactions.Local](http://tempcoverage.blob.core.windows.net/report2/System.Transactions.Local.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Transactions.Local.diff.csv))\r\n- [x] [System.Web.HttpUtility](http://tempcoverage.blob.core.windows.net/report2/System.Web.HttpUtility.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Web.HttpUtility.diff.csv)) - Nothing to remove\r\n- [x] [System.Xml.XPath.XDocument](http://tempcoverage.blob.core.windows.net/report2/System.Xml.XPath.XDocument.diff.html) ([csv](http://tempcoverage.blob.core.windows.net/report2/System.Xml.XPath.XDocument.diff.csv)) - Nothing to remove\r\n\r\n### background\r\nThe reports were generated by enabling ILLink (mono linker build from codegen team /cc @erozenfeld) and diffing the output.  \r\n\r\nThe diffs are from a Windows build and constrained to only assemblies that are part of NETCore.App.\r\n\r\nWhen the linker is enabled it will produce a \"PreTrim\" folder in the object folder of an assembly, for example `<corefx>\\bin\\obj\\AnyOS.AnyCPU.Debug\\Microsoft.CSharp\\netstandard\\PreTrim\\Microsoft.CSharp.dll`.  \r\n\r\nTo enable a central copy of the trimmed assemblies you can set the property `BinPlaceILLinkTrimAssembly=true`,  This will copy all pretrimmed and trimmed assemblies to a folder under bin: `<corefx>\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Debug-x64`.\r\n\r\nTo generate the reports linked in this issue you must have a copy of the AsmDiff.exe tool.  This tool isn't yet available for core, see (https://github.com/dotnet/buildtools/issues/1420).  If you have the desktop version of the tool you can enable the reporting by setting `AsmDiffCmd=<pathToAsmDiff.exe>`\r\n\r\nThe linker can be enabled for any project (not just those in NETCore.App) by building with `ILLinkTrimAssembly=true` after https://github.com/dotnet/corefx/pull/17825 is merged.\r\n\r\n## how to tackle a library\r\n\r\nPick a library and make a note you're going to work on it. \r\n\r\nOpen the html report above for the library. Look for lines in red. These are theoretically dead. Search for the code in the `src` folder of this repo and delete it. Continue through the report for the library and delete all the dead code like that.\r\n\r\nBUT there ere are some special cases:\r\n\r\n1. This is a very common one. Anything with “const”, please ignore. These are all fields inlined by the compiler, we want to keep them in the sources. Typically ints and strings.\r\n1. Anything that is “static string” in “class SR” is special. Instead of editing a C# file you must find the matching entry in the .resx file and remove that. The .resx file for a library is in `src\\<library>\\src\\Resources\\strings.resx`. The build will regenerate SR after you do this. Ignore anything else in “class SR” -- there are several methods that may show up as dead.\r\n1. Ignore any private parameterless constructors. We have these in the code to prevent accidentally instantiating the class, we want to keep them in the code.\r\n1. Ignore any public parameterless constructors if there are no other constructors. These are not real.\r\n1. Some code will not be under the library’s folder, it will be in src\\common. This code may not actually be dead because another library may use it. Ideally, grep to see whether anyone else in the tree uses it -- if so, it can be deleted. Or, ignore it and we can do another pass later.\r\n1. If the code is only used in Unix, UAP, etc do not delete it. It is likely not dead. You can tell whether it's of this type by being surrounded by eg `#if uap` or having a condition in the .csproj file like eg ` '$(TargetGroup)' == 'uap'\"`\r\n\r\nAfter you have removed the dead code from a library, make sure it builds (run “msbuild” in the “src” folder for the library). If it does not, go backwards. If it does build, next check the tests build and pass (run “msbuild /t:buildandtest” in the “tests” folder). Again if they do not, retrace your steps.\r\n\r\nIf that all looks good, you can put up a PR for the library. When the PR goes in, we can check it off here.\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/377324483","html_url":"https://github.com/dotnet/corefx/issues/17905#issuecomment-377324483","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/17905","id":377324483,"user":{"login":"erozenfeld","id":10624223,"avatar_url":"https://avatars2.githubusercontent.com/u/10624223?v=4","gravatar_id":"","url":"https://api.github.com/users/erozenfeld","html_url":"https://github.com/erozenfeld","followers_url":"https://api.github.com/users/erozenfeld/followers","following_url":"https://api.github.com/users/erozenfeld/following{/other_user}","gists_url":"https://api.github.com/users/erozenfeld/gists{/gist_id}","starred_url":"https://api.github.com/users/erozenfeld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erozenfeld/subscriptions","organizations_url":"https://api.github.com/users/erozenfeld/orgs","repos_url":"https://api.github.com/users/erozenfeld/repos","events_url":"https://api.github.com/users/erozenfeld/events{/privacy}","received_events_url":"https://api.github.com/users/erozenfeld/received_events","type":"User","site_admin":false},"created_at":"2018-03-29T18:12:23Z","updated_at":"2018-03-29T18:12:23Z","author_association":"MEMBER","body":"The enum values were probably inlined in msil so the tool doesn't see them. The same is true for constants. Nothing should be done for source code in these cases."}}
{"actor":{"display_login":"erozenfeld"}}