File tree 1 file changed +9
-1
lines changed
src/Microsoft.PowerShell.Commands.Utility/commands/utility
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 13
13
using System . Management . Automation . Internal ;
14
14
using System . Management . Automation . Security ;
15
15
using System . Reflection ;
16
+ using System . Runtime . CompilerServices ;
16
17
using System . Runtime . Loader ;
17
18
using System . Security ;
18
19
using System . Text ;
@@ -891,7 +892,14 @@ private IEnumerable<PortableExecutableReference> GetPortableExecutableReferences
891
892
892
893
private void WriteTypes ( Assembly assembly )
893
894
{
894
- WriteObject ( assembly . GetTypes ( ) , true ) ;
895
+ foreach ( Type type in assembly . GetTypes ( ) )
896
+ {
897
+ // We only write out types that are not auto-generated by compiler.
898
+ if ( type . GetCustomAttribute < CompilerGeneratedAttribute > ( ) is null )
899
+ {
900
+
5A8D
WriteObject ( type ) ;
901
+ }
902
+ }
895
903
}
896
904
897
905
#endregion LoadAssembly
You can’t perform that action at this time.
0 commit comments