@@ -49,14 +49,29 @@ public nanoSkeletonGenerator(
4949
5050 public void GenerateSkeleton ( )
5151 {
52- // create <assembly>.h with the structs declarations
53- GenerateAssemblyHeader ( ) ;
52+ // check if there are any native methods
53+ if ( _tablesContext . MethodDefinitionTable . Items . Any ( method => method . RVA == 0 && ! method . IsAbstract ) )
54+ {
55+ // create <assembly>.h with the structs declarations
56+ GenerateAssemblyHeader ( ) ;
57+
58+ // generate <assembly>.cpp with the lookup definition
59+ GenerateAssemblyLookup ( ) ;
5460
55- // generate <assembly>.cpp with the lookup definition
56- GenerateAssemblyLookup ( ) ;
61+ // generate stub files for classes, headers and marshalling code, if required
62+ GenerateStubs ( ) ;
5763
58- // generate stub files for classes, headers and marshalling code, if required
59- GenerateStubs ( ) ;
64+ // output native checksum so it shows in build log
65+ Console . WriteLine ( "++++++++++++++++++++++++++++++++++++++++++++" ) ;
66+ Console . WriteLine ( $ "+ Native declaration checksum: 0x{ _tablesContext . NativeMethodsCrc . Current . ToString ( "X" ) } +") ;
67+ Console . WriteLine ( "++++++++++++++++++++++++++++++++++++++++++++" ) ;
68+ }
69+ else
70+ {
71+ Console . WriteLine ( "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" ) ;
72+ Console . WriteLine ( "+ Skipping skeleton generation because this class doesn't have native implementation +" ) ;
73+ Console . WriteLine ( "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" ) ;
74+ }
6075 }
6176
6277 private void GenerateStubs ( )
0 commit comments