File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 4343 "type" : " boolean" ,
4444 "default" : false ,
4545 "description" : " If true, the log file will overwrite previous log files of the same name if they exist, default is false."
46+ },
47+ "ooxml.dotNetPath" : {
48+ "type" : " string" ,
49+ "description" : " The absolute path to the .Net Runtime"
4650 }
4751 }
4852 },
128132 "dependencies" : {
129133 "csv-writer" : " ^1.6.0"
130134 }
131- }
135+ }
Original file line number Diff line number Diff line change @@ -340,13 +340,17 @@ export default class OOXMLValidator {
340340 await commands . executeCommand ( 'dotnet.showAcquisitionLog' ) ;
341341
342342 const requestingExtensionId = 'mikeebowen.ooxml-validator-vscode' ;
343- const commandRes = await commands . executeCommand < IDotnetAcquireResult > ( 'dotnet.acquire' , {
344- version : '3.1' ,
345- requestingExtensionId,
346- } ) ;
347- const dotnetPath = commandRes ! . dotnetPath ;
343+ let dotnetPath : string | undefined = workspace . getConfiguration ( 'ooxml' ) . get ( 'dotNetPath' ) ;
344+
348345 if ( ! dotnetPath ) {
349- throw new Error ( 'Could not resolve the dotnet path!' ) ;
346+ const commandRes = await commands . executeCommand < IDotnetAcquireResult > ( 'dotnet.acquire' , {
347+ version : '3.1' ,
348+ requestingExtensionId,
349+ } ) ;
350+ dotnetPath = commandRes ! . dotnetPath ;
351+ if ( ! dotnetPath ) {
352+ throw new Error ( 'Could not resolve the dotnet path!' ) ;
353+ }
350354 }
351355
352356 const ooxmlValidateExtension = extensions . getExtension ( requestingExtensionId ) ;
You can’t perform that action at this time.
0 commit comments