Closed antineutrino closed 7 months ago
There's been an intentional change of behavior where if a class is reachable by the public API of the main assembly, it will no longer be internalized, to prevent inconsistencies in access modifiers. It seems that InvalidDataException may be used by some other public API?
Also, internalize doesn't internalize types in the main assembly. This is also by design.
I see some other types in the Persistence namespace such as ConnectionInfo, IDbTracer, etc. seem to be internal.
The public types are not used anywhere in the solution where the repacking is happening. Is there some special behavior when it comes to exception types?
Hard to say without having access to your assemblies to investigate.
The source code is here if you want to debug: https://github.com/gluck/il-repack/blob/master/ILRepack/Steps/PublicTypesFixStep.cs
The problem can be reproduced with this solution. Exception types seem to have some special behavior.
If I understand the code correctly, the issue seems to be this code:
https://github.com/gluck/il-repack/commit/0ce59b14493dae9772c6c677c043baa8775748dd#diff-5c1acbbbdc2379afb7f358e73fd668909104afaa4fd792bee05b481000647abe
Serializable types (like exceptions) are always not internalized.
A way to get the old behavior would be nice.
Hi, I think this works in principle.
But there seems to be an issue when parsing the command line.
Without this line the new cli argument is in the input assemblies list
This leads to an error later on.
interesting, thanks for testing it! I'll look at the fix tomorrow, it's actually surprising behavior that I might want to fix
My apologies once again! I wasn't very experienced with this command line API. Found the problem here: https://github.com/gluck/il-repack/commit/b8986b8c5a768de2769c3e767cc7e171355613d8
How's this?
Looks good to me.
Any plans to release a new BuildTask version?
I just published https://www.nuget.org/packages/ILRepack/2.0.26
and sent this PR to update this repo: https://github.com/ravibpatel/ILRepack.Lib.MSBuild.Task/pull/48
The following
generates this Assembly
![image](https://github.com/ravibpatel/ILRepack.Lib.MSBuild.Task/assets/1374766/11964eb7-44df-49b6-9b51-29ed8e525fa6)
It worked with 2.0.18.