Closed sturlath closed 3 years ago
AFAIK the CLR only supports calling internal members with this attribute. So the Publicize task only transforms internal
to public
. But you can experiment, with the code perhaps it would work with private
as well.
Thanks. I’ll look into it now that I know what the problem area is.
Somehow he manages to do it here https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/ (evenhough I havent gotten that to work either 🙈)
Doesn't work for me either. I tried a whole bunch of combinations of everything from packages to source code in the assembly, and nothing works. I think it may be possible that the CLR team decided that the ability to make everything in a third party assembly public was too dangerous to give to people. Either that or having the .NET Core 3.0 preview installed is messing with CLR in a way that disables this functionality.
Closing as it doesn't seem possible
Actually calling private member does work. There's another package similar to this one, MakeTypesPublic, which works flawlessly with private members.
Hi I was trying this out on Strathweb.Samples.CSharp.NoVisibilityChecks and it works for classes but I can't get it to work with the private method Calculate().
Shouldn't it work there also?