Skip to content

Commit 855efda

Browse files
jasonmalinowskiarunchndr
authored andcommitted
Fix '"file" argument must be of type string' error (#5931)
Fixes #5920 Fixes dotnet/vscode-dotnet-runtime#1007 (and many, many more duplicates)
1 parent 2a6f1e5 commit 855efda

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lsptoolshost/dotnetRuntimeExtensionResolver.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,17 @@ export class DotnetRuntimeExtensionResolver implements IHostExecutableResolver {
8888
/**
8989
* Acquires the .NET runtime and any other dependencies required to spawn a particular .NET executable.
9090
* @param path The path to the entrypoint assembly. Typically a .dll.
91-
* @returns The path to the `dotnet` command to use to spawn the process.
9291
*/
93-
private async acquireDotNetProcessDependencies(path: string) {
94-
const dotnetPath = await this.acquireRuntime();
92+
private async acquireDotNetProcessDependencies(path: string): Promise<HostExecutableInformation> {
93+
const dotnetInfo = await this.acquireRuntime();
9594

9695
const args = [path];
9796
// This will install any missing Linux dependencies.
9897
await vscode.commands.executeCommand('dotnet.ensureDotnetDependencies', {
99-
command: dotnetPath,
98+
command: dotnetInfo.path,
10099
arguments: args,
101100
});
102101

103-
return dotnetPath;
102+
return dotnetInfo;
104103
}
105104
}

0 commit comments

Comments
 (0)