diff --git a/README.md b/README.md index ad0f469..75ffed0 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ The CLI includes six commands: ### Run in VS Code ```bash -dotnet build src/Verso.Host +dotnet build src/Verso.Host -f net10.0 cd vscode npm install npm run build:all diff --git a/THIRD-PARTY-NOTICES.md b/THIRD-PARTY-NOTICES.md index 0e692ed..f42052e 100644 --- a/THIRD-PARTY-NOTICES.md +++ b/THIRD-PARTY-NOTICES.md @@ -7,10 +7,10 @@ The original copyright notices and license texts are provided for each component | Component | Version | License | Project | |---|---|---|---| -| Microsoft.CodeAnalysis (Roslyn) | 4.12.0 | MIT | [dotnet/roslyn](https://github.com/dotnet/roslyn) | +| Microsoft.CodeAnalysis (Roslyn) | 4.12.0 / 5.0.0 | MIT | [dotnet/roslyn](https://github.com/dotnet/roslyn) | | NuGet.Protocol | 6.9.1 | Apache-2.0 | [NuGet/NuGet.Client](https://github.com/NuGet/NuGet.Client) | | Microsoft.AspNetCore.Components | 8.0.0 | MIT | [dotnet/aspnetcore](https://github.com/dotnet/aspnetcore) | -| Microsoft.PowerShell.SDK | 7.4.7 | MIT | [PowerShell/PowerShell](https://github.com/PowerShell/PowerShell) | +| Microsoft.PowerShell.SDK | 7.4.15 / 7.6.1 | MIT | [PowerShell/PowerShell](https://github.com/PowerShell/PowerShell) | | FSharp.Compiler.Service | 43.9.100 | MIT | [dotnet/fsharp](https://github.com/dotnet/fsharp) | | Jint | 4.6.4 | BSD-2-Clause | [sebastienros/jint](https://github.com/sebastienros/jint) | | pythonnet | 3.1.0-rc.0 | MIT | [pythonnet/pythonnet](https://github.com/pythonnet/pythonnet) | diff --git a/src/Verso.Host/Verso.Host.csproj b/src/Verso.Host/Verso.Host.csproj index 51e6ec8..6949640 100644 --- a/src/Verso.Host/Verso.Host.csproj +++ b/src/Verso.Host/Verso.Host.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 LatestMajor 10 enable diff --git a/src/Verso.PowerShell/Verso.PowerShell.csproj b/src/Verso.PowerShell/Verso.PowerShell.csproj index 76642aa..0f89931 100644 --- a/src/Verso.PowerShell/Verso.PowerShell.csproj +++ b/src/Verso.PowerShell/Verso.PowerShell.csproj @@ -19,8 +19,12 @@ - - + + + + + + diff --git a/src/Verso/Verso.csproj b/src/Verso/Verso.csproj index b2b826e..e8504fc 100644 --- a/src/Verso/Verso.csproj +++ b/src/Verso/Verso.csproj @@ -21,11 +21,21 @@ + + + + - + + + + + + + diff --git a/tests/Verso.Host.Tests/Verso.Host.Tests.csproj b/tests/Verso.Host.Tests/Verso.Host.Tests.csproj index d7603d1..a61ec14 100644 --- a/tests/Verso.Host.Tests/Verso.Host.Tests.csproj +++ b/tests/Verso.Host.Tests/Verso.Host.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 10 enable enable diff --git a/tests/Verso.PowerShell.Tests/Verso.PowerShell.Tests.csproj b/tests/Verso.PowerShell.Tests/Verso.PowerShell.Tests.csproj index a71ed70..fcd7306 100644 --- a/tests/Verso.PowerShell.Tests/Verso.PowerShell.Tests.csproj +++ b/tests/Verso.PowerShell.Tests/Verso.PowerShell.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net10.0 10 enable enable diff --git a/vscode/package.json b/vscode/package.json index a82c19b..8016cd3 100644 --- a/vscode/package.json +++ b/vscode/package.json @@ -386,7 +386,7 @@ }, "scripts": { "build": "node esbuild.mjs", - "build:host": "dotnet publish ../src/Verso.Host -c Release -o host", + "build:host": "dotnet publish ../src/Verso.Host -c Release -f net10.0 -o host", "build:wasm": "dotnet publish ../src/Verso.Blazor.Wasm -c Release -o blazor-wasm", "build:all": "npm run build:host && npm run build:wasm && npm run build", "watch": "node esbuild.mjs --watch", diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts index faeb33d..1a1b89d 100644 --- a/vscode/src/extension.ts +++ b/vscode/src/extension.ts @@ -80,18 +80,21 @@ export function resolveHostPath( // Search workspace folders for the Verso.Host.dll (check Release first, then Debug) const configs = ["Release", "Debug"]; + const hostTargetFrameworks = ["net10.0", "net8.0"]; const workspaceFolders = options.workspaceFolders ?? vscode.workspace.workspaceFolders ?? []; for (const folder of workspaceFolders) { for (const cfg of configs) { - const candidates = [ - // Direct workspace is the Verso project - path.join(folder.uri.fsPath, "src", "Verso.Host", "bin", cfg, "net8.0", "Verso.Host.dll"), - // Workspace is a parent (e.g., Datafication.DataIntegration) - path.join(folder.uri.fsPath, "tools", "Verso", "src", "Verso.Host", "bin", cfg, "net8.0", "Verso.Host.dll"), - ]; - for (const candidate of candidates) { - if (existsSync(candidate)) { - return candidate; + for (const tfm of hostTargetFrameworks) { + const candidates = [ + // Direct workspace is the Verso project + path.join(folder.uri.fsPath, "src", "Verso.Host", "bin", cfg, tfm, "Verso.Host.dll"), + // Workspace is a parent (e.g., Datafication.DataIntegration) + path.join(folder.uri.fsPath, "tools", "Verso", "src", "Verso.Host", "bin", cfg, tfm, "Verso.Host.dll"), + ]; + for (const candidate of candidates) { + if (existsSync(candidate)) { + return candidate; + } } } } @@ -99,9 +102,11 @@ export function resolveHostPath( // Fallback: relative to extension path (works in dev host / local install) for (const cfg of configs) { - const extensionRelative = path.join(context.extensionPath, "..", "src", "Verso.Host", "bin", cfg, "net8.0", "Verso.Host.dll"); - if (existsSync(extensionRelative)) { - return extensionRelative; + for (const tfm of hostTargetFrameworks) { + const extensionRelative = path.join(context.extensionPath, "..", "src", "Verso.Host", "bin", cfg, tfm, "Verso.Host.dll"); + if (existsSync(extensionRelative)) { + return extensionRelative; + } } } diff --git a/vscode/test/suite/extension.test.ts b/vscode/test/suite/extension.test.ts index fbc1cf9..943b803 100644 --- a/vscode/test/suite/extension.test.ts +++ b/vscode/test/suite/extension.test.ts @@ -86,4 +86,28 @@ suite("Extension Activation", () => { assert.strictEqual(resolved, configured); }); + + test("Workspace host resolution prefers net10 over net8", () => { + const extensionPath = path.join("repo", "vscode"); + const workspacePath = path.resolve("repo", "Verso"); + const context = { + extensionPath, + extensionMode: vscode.ExtensionMode.Production, + } as vscode.ExtensionContext; + const workspaceFolder = { + uri: vscode.Uri.file(workspacePath), + name: "Verso", + index: 0, + }; + const workspaceFsPath = workspaceFolder.uri.fsPath; + const net10Host = path.join(workspaceFsPath, "src", "Verso.Host", "bin", "Debug", "net10.0", "Verso.Host.dll"); + const net8Host = path.join(workspaceFsPath, "src", "Verso.Host", "bin", "Debug", "net8.0", "Verso.Host.dll"); + + const resolved = resolveHostPath(context, { + existsSync: candidate => candidate === net10Host || candidate === net8Host, + workspaceFolders: [workspaceFolder], + }); + + assert.strictEqual(resolved, net10Host); + }); });