diff --git a/sdk_v2/js/script/install.cjs b/sdk_v2/js/script/install.cjs index f43f4f09..4d7b82b4 100644 --- a/sdk_v2/js/script/install.cjs +++ b/sdk_v2/js/script/install.cjs @@ -55,7 +55,7 @@ const CORE_FEED = useNightly ? ORT_NIGHTLY_FEED : NUGET_FEED; const ARTIFACTS = [ { name: useWinML ? 'Microsoft.AI.Foundry.Local.Core.WinML' : 'Microsoft.AI.Foundry.Local.Core', - version: useNightly ? undefined : useWinML ? '0.9.0.7-dev.20260209T090407.b5352143' : '0.9.0.8-dev.20260209T090216.b5352143', // Set later using resolveLatestVersion if undefined + version: useNightly ? undefined : useWinML ? '0.9.0.194-dev-20260220T213816-a79d8a61' : '0.9.0.8-dev.20260209T090216.b5352143', // Set later using resolveLatestVersion if undefined feed: ORT_NIGHTLY_FEED }, { diff --git a/sdk_v2/js/src/detail/coreInterop.ts b/sdk_v2/js/src/detail/coreInterop.ts index d74c1c1a..61b5740b 100644 --- a/sdk_v2/js/src/detail/coreInterop.ts +++ b/sdk_v2/js/src/detail/coreInterop.ts @@ -52,6 +52,14 @@ export class CoreInterop { const corePath = path.join(packageDir, `Microsoft.AI.Foundry.Local.Core${ext}`); if (fs.existsSync(corePath)) { config.params['FoundryLocalCorePath'] = corePath; + + // Auto-detect if WinML Bootstrap is needed by checking for Bootstrap DLL in FoundryLocalCorePath + const bootstrapDllPath = path.join(packageDir, 'Microsoft.WindowsAppRuntime.Bootstrap.dll'); + if (fs.existsSync(bootstrapDllPath)) { + // WinML Bootstrap DLL found, enable bootstrapping + config.params['Bootstrap'] = 'true'; + } + return corePath; } @@ -72,6 +80,7 @@ export class CoreInterop { if (process.platform === 'win32') { koffi.load(path.join(coreDir, `onnxruntime${ext}`)); koffi.load(path.join(coreDir, `onnxruntime-genai${ext}`)); + process.env.PATH = `${coreDir};${process.env.PATH}`; } this.lib = koffi.load(corePath);