@@ -49,7 +49,7 @@ await Execute(async (cancellationToken, cancellationEvent) =>
4949
5050 progressReport . Finish ( ) ;
5151
52- if ( dbSchemaFile . Exists )
52+ if ( dbSchemaFile . Exists )
5353 {
5454 progressReport . Start ( "Merge and update database schema file" ) ;
5555
@@ -83,7 +83,7 @@ public static async Task BuildJsonAndMkDocs(DatabaseEngine dbEngine, string dbCo
8383 await Execute ( async ( cancellationToken , cancellationEvent ) =>
8484 {
8585 var progressReport = ProgressReportFactory . CreateProgressReport ( ProgressUnit . Count ) ;
86- var catalog = new Catalog ( "SqlDocs" , "./L11n" , new CultureInfo ( language ) ) ;
86+ var catalog = new Catalog ( "SqlDocs" , Path . Combine ( GetAppFolder ( ) , "./L11n" ) , new CultureInfo ( language ) ) ;
8787 try
8888 {
8989 progressReport . Start ( "Generate database schema" ) ;
@@ -137,7 +137,7 @@ public static async Task BuildMkDocs(DatabaseEngine dbEngine, FileInfo dbSchemaF
137137 await Execute ( async ( cancellationToken , cancellationEvent ) =>
138138 {
139139 var progressReport = ProgressReportFactory . CreateProgressReport ( ProgressUnit . Count ) ;
140- var catalog = new Catalog ( "SqlDocs" , "./L11n" , new CultureInfo ( language ) ) ;
140+ var catalog = new Catalog ( "SqlDocs" , Path . Combine ( GetAppFolder ( ) , "./L11n" ) , new CultureInfo ( language ) ) ;
141141 try
142142 {
143143 progressReport . Start ( "Load database schema file" ) ;
@@ -200,5 +200,14 @@ private static async Task Execute(Func<CancellationToken, EventWaitHandle, Task>
200200 Console . WriteLine ( ) ;
201201 Console . WriteLine ( $ "Time elapsed: { stopwatch . Elapsed } .") ;
202202 }
203+
204+ private static string GetAppFolder ( )
205+ {
206+ // Get the full location of the assembly
207+ string assemblyLocation = Environment . ProcessPath ;
208+
209+ // Get the folder that's in
210+ return Path . GetDirectoryName ( assemblyLocation ) ;
211+ }
203212 }
204213}
0 commit comments