Commit fc5c296
authored
Improve the trim incompatibility message for Assembly.GetType (#91876)
Currently calling `Assembly.GetType` is always a warning when trimming. But typically the code can be changed to use `Type.GetType` with assembly qualified type name, which is a trim compatible pattern.
This modifies the warning message on the `RequiresUnreferencedCode` attribute for `Assembly.GetType` to suggest using `Type.GetType` instead.1 parent f276c51 commit fc5c296
File tree
14 files changed
+30
-29
lines changed- src
- coreclr
- System.Private.CoreLib/src/System/Reflection
- Emit
- nativeaot/System.Private.CoreLib/src
- System/Reflection/Runtime/Modules
- libraries
- System.Private.CoreLib/src/System/Reflection
- System.Reflection.Emit/ref
- System.Runtime/ref
- mono/System.Private.CoreLib/src/System/Reflection
- Emit
14 files changed
+30
-29
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
545 | | - | |
| 545 | + | |
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
446 | | - | |
| 446 | + | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11032 | 11032 | | |
11033 | 11033 | | |
11034 | 11034 | | |
11035 | | - | |
| 11035 | + | |
11036 | 11036 | | |
11037 | | - | |
| 11037 | + | |
11038 | 11038 | | |
11039 | | - | |
| 11039 | + | |
11040 | 11040 | | |
11041 | 11041 | | |
11042 | 11042 | | |
| |||
11859 | 11859 | | |
11860 | 11860 | | |
11861 | 11861 | | |
11862 | | - | |
| 11862 | + | |
11863 | 11863 | | |
11864 | | - | |
| 11864 | + | |
11865 | 11865 | | |
11866 | | - | |
| 11866 | + | |
11867 | 11867 | | |
11868 | 11868 | | |
11869 | 11869 | | |
| |||
0 commit comments