Commit 47d7855
fix: resolve FSharp.Core version mismatch in item type resolution (Closes #433)
When the F# compiler process runs at a different FSharp.Core version than the
compiled project (e.g. compiler has 8.0.0.0, project is pinned to 7.0.0.0),
the assembly-qualified type name baked into the quoted expression by the design
time DLL contains the compiler's FSharp.Core version. At runtime, Type.GetType
then fails with FileLoadException because the requested assembly version is not
loaded.
Fix: try the exact assembly-qualified name first; if that returns null, strip
Version/Culture/PublicKeyToken from all assembly references in the name and
retry, allowing the runtime's own assembly-binding logic to locate the correct
version of FSharp.Core (or any other assembly affected by the same pattern).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b488403 commit 47d7855
1 file changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
36 | 54 | | |
37 | 55 | | |
38 | 56 | | |
| |||
108 | 126 | | |
109 | 127 | | |
110 | 128 | | |
111 | | - | |
| 129 | + | |
112 | 130 | | |
113 | 131 | | |
114 | 132 | | |
| |||
0 commit comments