File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
33using System . Linq ;
4+ using System . Reflection ;
5+ using System . Runtime . CompilerServices ;
46using System . Threading . Tasks ;
57using System . Windows . Media . Imaging ;
68using Autodesk . Revit . DB ;
@@ -29,7 +31,17 @@ public class Application : IExternalApplication, IScriptRunner
2931
3032 public Application ( )
3133 {
32-
34+ AppDomain . CurrentDomain . AssemblyResolve += CurrentDomain_AssemblyResolve ;
35+ }
36+
37+ private System . Reflection . Assembly CurrentDomain_AssemblyResolve ( object sender , ResolveEventArgs args )
38+ {
39+ var name = new AssemblyName ( args . Name ) ;
40+ if ( name . Name == "System.Runtime.CompilerServices.Unsafe" )
41+ {
42+ return typeof ( Unsafe ) . Assembly ;
43+ }
44+ return null ;
3345 }
3446
3547
You can’t perform that action at this time.
0 commit comments