@@ -470,6 +470,8 @@ export function generateVSDetector(): string {
470470 * Supports Visual Studio 2019, 2022, and 2026.
471471 */
472472
473+ import { join } from "jsr:@std/path@1.0.8";
474+
473475export interface VSVersion {
474476 year: string;
475477 version: string;
@@ -509,8 +511,8 @@ export async function detectInstalledVSVersions(): Promise<VSVersion[]> {
509511 try {
510512 // Common Visual Studio installation base paths
511513 const basePaths = [
512- "C:\\\\ Program Files\\\\ Microsoft Visual Studio",
513- "C:\\\\ Program Files (x86)\\\\ Microsoft Visual Studio",
514+ join( "C:", " Program Files", " Microsoft Visual Studio") ,
515+ join( "C:", " Program Files (x86)", " Microsoft Visual Studio") ,
514516 ];
515517
516518 // Check each supported version
@@ -520,13 +522,13 @@ export async function detectInstalledVSVersions(): Promise<VSVersion[]> {
520522 const editions = ["Community", "Professional", "Enterprise"];
521523
522524 for (const edition of editions) {
523- const fullPath = \\\`\\\${ basePath}\\\\\\\\\\\${ vsVersion.year}\\\\\\\\\\\${ edition}\\\` ;
525+ const fullPath = join( basePath, vsVersion.year, edition) ;
524526
525527 try {
526528 const stat = await Deno.stat(fullPath);
527529 if (stat.isDirectory) {
528530 // Check if VC tools are installed
529- const vcToolsPath = \\\`\\\${ fullPath}\\\\\\\\VC\\\\\\\\ Tools\\\\\\\\ MSVC\\\` ;
531+ const vcToolsPath = join( fullPath, "VC", " Tools", " MSVC") ;
530532 try {
531533 await Deno.stat(vcToolsPath);
532534 installedVersions.push({
0 commit comments