Commit a407adb
authored
fix: safely load assemblies in ConcertoTypeDictionary (#40)
* build: Build projects using .NET 8.0.
- Update all projects' target framework in `.NET8.0` (from `standard2.0`)
- Update all projects' C# version to 12 (from 10)
- Updated NuGet packages
- Fixes for compilation:
1. `ConcertoConverter.deserializeWithGenericType` chose the wrong overloaded method. Added expected parameters to choose the correct method.
2. Added `Decorator.cs` to declare the existence of `AccordProject.Concerto.Decorator` namespace, because the code generation script added `using AccordProject.Concerto.Decorator` for some reason and the compilation failed.
Signed-off-by: Yuval Bavli <[email protected]>
* fix: safely load assemblies
Change assembly.GetTypes() to a more lenient approach "GetLoadableTypes()" where ReflectionTypeLoadException is being ignored, and we load only the types that we are able to load.
The reason for this is that there may be some dlls that will fail to load which will fail the entire flow.
For example the following error (which happened):
ReflectionTypeLoadException : Unable to load one or more of the requested types.\nCould not load type 'SqlGuidCaster' from assembly 'System.Data.SqlClient, Version=4.6.1.6, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field."
Signed-off-by: Yuval Bavli <[email protected]>
---------
Signed-off-by: Yuval Bavli <[email protected]>1 parent 69d25ea commit a407adb
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
93 | 106 | | |
0 commit comments