@@ -37,16 +37,22 @@ export interface LaunchTarget {
3737 * (if it doesn't contain a `project.json` file, but `project.json` files exist). In addition, the root folder
3838 * is included if there are any `*.csproj` files present, but a `*.sln* file is not found.
3939 */
40- export function findLaunchTargets ( options : Options ) : Thenable < LaunchTarget [ ] > {
40+ export async function findLaunchTargets ( options : Options ) : Promise < LaunchTarget [ ] > {
4141 if ( ! vscode . workspace . workspaceFolders ) {
4242 return Promise . resolve ( [ ] ) ;
4343 }
4444
45- return vscode . workspace . findFiles (
46- /*include*/ '{**/*.sln,**/*.csproj,**/project.json,**/*.csx,**/*.cake,**/*.cs}' ,
47- /*exclude*/ '{**/node_modules/**,**/.git/**,**/bower_components/**}' ,
48- /*maxResults*/ options . maxProjectResults )
49- . then ( resourcesToLaunchTargets ) ;
45+ const projectFiles = await vscode . workspace . findFiles (
46+ /*include*/ '{**/*.sln,**/*.csproj,**/project.json,**/*.csx,**/*.cake}' ,
47+ /*exclude*/ '{**/node_modules/**,**/.git/**,**/bower_components/**}' ,
48+ /*maxResults*/ options . maxProjectResults ) ;
49+
50+ const csFiles = await vscode . workspace . findFiles (
51+ /*include*/ '{**/*.cs}' ,
52+ /*exclude*/ '{**/node_modules/**,**/.git/**,**/bower_components/**}' ,
53+ /*maxResults*/ options . maxProjectResults ) ;
54+
55+ return resourcesToLaunchTargets ( projectFiles . concat ( csFiles ) ) ;
5056}
5157
5258function resourcesToLaunchTargets ( resources : vscode . Uri [ ] ) : LaunchTarget [ ] {
0 commit comments