This saves 50 kB on a hello world app.
This is using the existing ReflectionBlocked attribute to manually block public types that get otherwise blocked by the IL2IL toolchain in Project N. These types are public within the repo, but should be considered private implementation details everywhere else.
Wrote a small tool that would let me identify these: https://gist.github.com/MichalStrehovsky/
e2ddec899d3e0db6eba95bf68694b40e. There is more.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
namespace System.Reflection
{
#if CORERT
+ [System.Runtime.CompilerServices.ReflectionBlocked]
public // Needs to be public so that Reflection.Core can see it.
#else
internal