Commit 5a834d4
authored
[jnimarshalmethod-gen] Avoid creating AppDomains (#720)
This is part of getting `jnimarshalmethod-gen` to work on Windows and
later with .NET 5.
The created `AppDomain` was used to isolate processed assembly, so that
we could unload it and rewrite with generated changes; see 2a9ac6a.
That didn't work on Windows even with .NET Framework, which has
the full `AppDomain` API. In .NET 5, `AppDomain`s can't be created.
Instead of using `AppDomain`s, pre-load the assembly in memory and
load it from there. This avoids the file sharing issues.1 parent a76edb8 commit 5a834d4
1 file changed
+2
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
52 | | - | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
| |||
282 | 278 | | |
283 | 279 | | |
284 | 280 | | |
285 | | - | |
286 | | - | |
| 281 | + | |
287 | 282 | | |
288 | 283 | | |
289 | 284 | | |
| |||
0 commit comments