MCPcopy Index your code
hub / github.com/dotnet/vscode-csharp / getMSBuildVersion

Function getMSBuildVersion

src/utils/getMsBuildInfo.ts:12–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10let _msbuildVersion: string | undefined;
11
12export async function getMSBuildVersion(): Promise<string | undefined> {
13 if (_msbuildVersion !== undefined) {
14 return _msbuildVersion;
15 }
16
17 const msbuildExeName = join('msbuild', CoreClrDebugUtil.getPlatformExeExtension());
18
19 try {
20 const data = await execChildProcess(`${msbuildExeName} -version -nologo`, process.cwd(), process.env);
21 const match = /^(\d+\.\d+\.\d+\.\d+)$/.exec(data);
22 if (match) {
23 _msbuildVersion = match[1];
24 }
25 } catch {
26 /* empty */
27 }
28
29 return _msbuildVersion;
30}

Callers 1

checkRequirementsFunction · 0.90

Calls 2

execChildProcessFunction · 0.90

Tested by

no test coverage detected