File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System . Diagnostics ;
1
2
using Microsoft . CodeAnalysis ;
2
3
using Microsoft . CodeAnalysis . MSBuild ;
3
4
using Microsoft . Extensions . DependencyInjection ;
@@ -19,8 +20,25 @@ public ScipIndexer(ILogger<ScipIndexer> logger)
19
20
20
21
private ILogger < ScipIndexer > Logger { get ; }
21
22
23
+ public void Restore ( IndexCommandOptions options )
24
+ {
25
+ var process = new Process ( )
26
+ {
27
+ StartInfo = new ProcessStartInfo ( )
28
+ {
29
+ WorkingDirectory = options . WorkingDirectory . FullName ,
30
+ FileName = "dotnet" ,
31
+ Arguments = options . ProjectsFile . FullName . EndsWith ( ".sln" )
32
+ ? $ "restore { options . ProjectsFile . FullName } "
33
+ : "restore"
34
+ }
35
+ } ;
36
+ process . Start ( ) ;
37
+ }
38
+
22
39
public async IAsyncEnumerable < Scip . Document > IndexDocuments ( IHost host , IndexCommandOptions options )
23
40
{
41
+ Restore ( options ) ;
24
42
IEnumerable < Project > projects = string . Equals ( options . ProjectsFile . Extension , ".csproj" )
25
43
? new [ ]
26
44
{
You can’t perform that action at this time.
0 commit comments