refactor(dotnet): remove the standalone .NET tool window (#5918)

Removes the standalone .NET tool window, its stripe button and dotnet.show. NuGet package search / install / update / remove move to a bottom "NuGet Packages" tool window (stripe onUse) opened by dotnet.packages. Build / Restore / Clean / Test act on the project of the current context: the Project view's selected .csproj / .fsproj / .vbproj / .sln, else the active editor's project, else the solution (the NuGet-selected project without one); an unloaded workspace model is scanned once, shared between concurrent actions and the NuGet window, and retried after a failure. Build / Restore / Clean join the Project view context menu for project and solution files.

Review fixes: the context target reads the workbench projectViewSelection() instead of importing the project-tree store; the NuGet window loads the model through the shared scan; the menu uses the same path helpers as the target resolution.

Refs #5635

Co-authored-by: Inf1mum <[email protected]>
Цей коміт міститься в:
Vadim LazukтаInf1mum authored and GitHub committed 2026-11-26 03:51:30 +08:00
1 джерело 2ba2f33232
коміт 5a884d7cba
19 files changed
+770 -407

No files matched your search

-225
Переглянути файл
@@ -1,225 +0,0 @@
import { executeAction } from "@/platform/actions";
import { useState } from "react";
import { useProject } from "@/platform/project";
import { useTx } from "@/platform/i18n";
import { Button, Input } from "@/ui";
import { useDotnet } from "./store";
import styles from "./Dotnet.module.css";
export function DotnetView() {
const s = useDotnet();
const tx = useTx();
const root = useProject((state) => state.project?.root ?? "");
const relative = (path: string) => (root && path.startsWith(root + "/") ? path.slice(root.length + 1) : path);
const [versions, setVersions] = useState<Record<string, string>>({});
const results = new Map<string, string[]>();
for (const p of s.found) results.set(p.id, [...new Set([...(results.get(p.id) ?? []), p.version])]);
const project = s.model.projects.find((p) => p.path === s.selected);
const action = (id: string, arg?: unknown) => void executeAction(`dotnet.${id}`, arg);
return (
<div className={styles.view}>
<div className={styles.toolbar}>
<Button disabled={s.busy} onClick={() => action("reload")}>
{tx("Reload .NET Workspace")}
</Button>
{s.busy && <Button onClick={() => action("cancel")}>{tx("Cancel")}</Button>}
</div>
{s.error && (
<div role="alert" className={styles.error}>
{s.error}
</div>
)}
{s.model.errors?.map((error) => (
<details key={error} className={styles.error}>
<summary>{tx("Project evaluation failed")}</summary>
{error}
</details>
))}
{s.model.solutions.map((solution) => (
<details key={solution.path}>
<summary>{solution.path.split("/").at(-1)}</summary>
{solution.projects.map((path) => (
<Button key={path} title={path} disabled={s.busy} onClick={() => action("select", { path })}>
{relative(path)}
</Button>
))}
</details>
))}
<label>
{tx(".NET project")}
<select
aria-label={tx(".NET project")}
value={s.selected}
disabled={s.busy}
onChange={(e) => action("select", { path: e.target.value })}
>
{!project && <option value="">{tx("Select a .NET project")}</option>}
{s.model.projects.map((p) => (
<option key={p.path} value={p.path}>
{relative(p.path)}
</option>
))}
</select>
</label>
{project && (
<>
<div className={styles.toolbar}>
<label>
{tx("Configuration")}
<select
aria-label={tx("Configuration")}
disabled={s.busy}
value={s.configuration}
onChange={(e) =>
action("select", { path: s.selected, configuration: e.target.value, framework: s.framework })
}
>
{project.configurations.map((c) => (
<option key={c}>{c}</option>
))}
</select>
</label>
<label>
{tx("Target framework")}
<select
aria-label={tx("Target framework")}
disabled={s.busy}
value={s.framework}
onChange={(e) =>
action("select", { path: s.selected, configuration: s.configuration, framework: e.target.value })
}
>
{project.frameworks.map((f) => (
<option key={f}>{f}</option>
))}
</select>
</label>
</div>
<div className={styles.toolbar}>
{["build", "restore", "clean"].map((op) => (
<Button key={op} disabled={s.busy} onClick={() => action(op)}>
{tx(op === "build" ? "Build" : op === "restore" ? "Restore" : "Clean")}
</Button>
))}
</div>
<details open>
<summary>{tx("Project references")}</summary>
{project.references.map((path) => (
<Button
key={path}
disabled={s.busy || !s.model.projects.some((p) => p.path === path)}
onClick={() => action("select", { path })}
>
{relative(path)}
</Button>
))}
</details>
<details open>
<summary>{tx("NuGet packages")}</summary>
<Button disabled={s.busy} onClick={() => action("packages")}>
{tx("Refresh packages")}
</Button>
<form
className={styles.toolbar}
onSubmit={(e) => {
e.preventDefault();
action("search", { query: s.query });
}}
>
<Input
aria-label={tx("Search NuGet packages")}
value={s.query}
onChange={(e) => useDotnet.setState({ query: e.target.value })}
/>
<Button type="submit" disabled={s.busy || !s.query.trim()}>
{tx("Search")}
</Button>
</form>
<ul className={styles.list}>
{[...results].map(([id, available]) => {
const version = available.includes(versions[id] ?? "") ? versions[id]! : available[0]!;
return (
<li key={id}>
<span>{id}</span>
<select
aria-label={tx("Version")}
value={version}
disabled={s.busy}
onChange={(e) => setVersions({ ...versions, [id]: e.target.value })}
>
{available.map((v) => (
<option key={v}>{v}</option>
))}
</select>
<Button disabled={s.busy} onClick={() => action("packageChange", { id, version })}>
{tx("Install / Update")}
</Button>
<Button disabled={s.busy} onClick={() => action("search", { query: id, exact: true })}>
{tx("Versions")}
</Button>
</li>
);
})}
</ul>
<ul className={styles.list}>
{s.packages.map((p) => (
<li key={`${p.id}:${p.version}`}>
<span>
{p.id} {p.version} {p.transitive ? tx("Transitive") : ""}
</span>
{!p.transitive && (
<>
<Button disabled={s.busy} onClick={() => action("search", { query: p.id, exact: true })}>
{tx("Versions")}
</Button>
<Button disabled={s.busy} onClick={() => action("packageChange", { id: p.id, version: null })}>
{tx("Remove")}
</Button>
</>
)}
</li>
))}
</ul>
</details>
{project.test && (
<details open>
<summary>{tx("Tests")}</summary>
<div className={styles.toolbar}>
<Button disabled={s.busy} onClick={() => action("discover")}>
{tx("Discover .NET Tests")}
</Button>
<Button disabled={s.busy} onClick={() => action("test")}>
{tx("Run all tests")}
</Button>
</div>
{project.runner !== "vstest" && !project.trx && (
<div>
{tx("Install the TRX reporting extension to show MTP results in the test panel.")}
<Button disabled={s.busy} onClick={() => action("installTrx")}>
{tx("Install TRX reporting")}
</Button>
</div>
)}
<ul className={styles.list}>
{s.tests.map((test) => (
<li key={test}>
<span>{test}</span>
<Button disabled={s.busy} onClick={() => action("test", test)}>
{tx("Run test")}
</Button>
</li>
))}
</ul>
</details>
)}
</>
)}
{s.output && (
<details>
<summary>{tx("Output")}</summary>
<pre className={styles.output}>{s.output}</pre>
</details>
)}
</div>
);
}
Переглянути файл
File renamed without changes.
+128
Переглянути файл
@@ -0,0 +1,128 @@
/**
* NuGet tool window: the selected .NET project's packages, with search and
* install / update / remove. The package management that used to live in the
* standalone .NET tool window (#5635).
*/
import { useEffect, useState } from "react";
import { executeAction } from "@/platform/actions";
import { useTx } from "@/platform/i18n";
import { Button, Input } from "@/ui";
import { ensureDotnetModel, useDotnet } from "./store";
import styles from "./Nuget.module.css";
export function NugetView() {
const s = useDotnet();
const tx = useTx();
const [versions, setVersions] = useState<Record<string, string>>({});
const results = new Map<string, string[]>();
for (const p of s.found) results.set(p.id, [...new Set([...(results.get(p.id) ?? []), p.version])]);
const project = s.model.projects.find((p) => p.path === s.selected);
const action = (id: string, arg?: unknown) => void executeAction(`dotnet.${id}`, arg);
// The workspace scan used to run when the standalone .NET window opened; without it the
// window shows no project to manage packages for.
useEffect(() => {
void ensureDotnetModel();
}, []);
return (
<div className={styles.view}>
<div className={styles.toolbar}>
<Button disabled={s.busy} onClick={() => action("packages")}>
{tx("Refresh packages")}
</Button>
{s.busy && <Button onClick={() => action("cancel")}>{tx("Cancel")}</Button>}
</div>
{s.error && (
<div role="alert" className={styles.error}>
{s.error}
</div>
)}
<label>
{tx(".NET project")}
<select
aria-label={tx(".NET project")}
value={s.selected}
disabled={s.busy}
onChange={(e) => action("select", { path: e.target.value })}
>
{!project && <option value="">{tx("Select a .NET project")}</option>}
{s.model.projects.map((p) => (
<option key={p.path} value={p.path}>
{p.name}
</option>
))}
</select>
</label>
{project && (
<>
<form
className={styles.toolbar}
onSubmit={(e) => {
e.preventDefault();
action("search", { query: s.query });
}}
>
<Input
aria-label={tx("Search NuGet packages")}
value={s.query}
onChange={(e) => useDotnet.setState({ query: e.target.value })}
/>
<Button type="submit" disabled={s.busy || !s.query.trim()}>
{tx("Search")}
</Button>
</form>
<ul className={styles.list}>
{[...results].map(([id, available]) => {
const version = available.includes(versions[id] ?? "") ? versions[id]! : available[0]!;
return (
<li key={id}>
<span>{id}</span>
<select
aria-label={tx("Version")}
value={version}
disabled={s.busy}
onChange={(e) => setVersions({ ...versions, [id]: e.target.value })}
>
{available.map((v) => (
<option key={v}>{v}</option>
))}
</select>
<Button disabled={s.busy} onClick={() => action("packageChange", { id, version })}>
{tx("Install / Update")}
</Button>
<Button disabled={s.busy} onClick={() => action("search", { query: id, exact: true })}>
{tx("Versions")}
</Button>
</li>
);
})}
</ul>
<ul className={styles.list}>
{s.packages.map((p) => (
<li key={`${p.id}:${p.version}`}>
<span>
{p.id} {p.version} {p.transitive ? tx("Transitive") : ""}
</span>
{!p.transitive && (
<>
<Button disabled={s.busy} onClick={() => action("search", { query: p.id, exact: true })}>
{tx("Versions")}
</Button>
<Button disabled={s.busy} onClick={() => action("packageChange", { id: p.id, version: null })}>
{tx("Remove")}
</Button>
</>
)}
</li>
))}
</ul>
</>
)}
{s.output && (
<details>
<summary>{tx("Output")}</summary>
<pre className={styles.output}>{s.output}</pre>
</details>
)}
</div>
);
}
+111 -99
Переглянути файл
@@ -1,7 +1,7 @@
import { registerActions } from "@/platform/actions";
import { useProject } from "@/platform/project";
import { registerToolWindow, toolWindowService } from "@/workbench/contributions";
import { DotnetView } from "./DotnetView";
import { lazyComponent } from "@/ui";
import { registerMenuGroup, registerToolWindow, toolWindowService } from "@/workbench/contributions";
import {
buildDotnet,
cancelDotnet,
@@ -15,111 +15,123 @@ import {
searchPackages,
selectDotnet,
} from "./store";
import { isDotnetProjectPath, isDotnetSolutionPath } from "./target";
const NUGET = "nuget";
export function activate() {
const offWindow = registerToolWindow({
id: "dotnet",
title: ".NET",
icon: "file-csharp",
anchor: "right",
stripe: "onUse",
component: DotnetView,
});
const show = () => toolWindowService().show("dotnet", true);
const offActions = registerActions([
{
id: "dotnet.show",
title: ".NET Workspace",
category: "Build",
when: "projectOpen",
run: () => {
show();
return reloadDotnet();
const disposers = [
registerToolWindow({
id: NUGET,
title: "NuGet Packages",
icon: "library",
anchor: "bottom",
// Listed under the stripe's "…" until first opened: most projects are not .NET ones.
stripe: "onUse",
order: 29,
component: lazyComponent(() => import("./NugetView").then((m) => m.NugetView)),
}),
registerActions([
{
id: "dotnet.reload",
title: "Reload .NET Workspace",
category: "Build",
when: "projectOpen",
run: () => reloadDotnet(),
},
},
{
id: "dotnet.reload",
title: "Reload .NET Workspace",
category: "Build",
when: "projectOpen",
run: () => reloadDotnet(),
},
{ id: "dotnet.cancel", title: "Cancel .NET Operation", category: "Build", run: () => cancelDotnet() },
{
id: "dotnet.select",
title: "Select .NET Project",
category: "Build",
hidden: true,
run: ({ arg }) => {
const a = arg as { path: string; configuration?: string; framework?: string };
return selectDotnet(a.path, a.configuration, a.framework);
{ id: "dotnet.cancel", title: "Cancel .NET Operation", category: "Build", run: () => cancelDotnet() },
{
id: "dotnet.select",
title: "Select .NET Project",
category: "Build",
hidden: true,
run: ({ arg }) => {
const a = arg as { path: string; configuration?: string; framework?: string };
return selectDotnet(a.path, a.configuration, a.framework);
},
},
},
...(["build", "restore", "clean"] as const).map((op) => ({
id: `dotnet.${op}`,
title: op === "build" ? "Build .NET Project" : op === "restore" ? "Restore .NET Project" : "Clean .NET Project",
category: "Build",
when: "projectOpen",
run: () => buildDotnet(op),
})),
{
id: "dotnet.packages",
title: "Refresh NuGet Packages",
category: "Build",
when: "projectOpen",
run: () => listPackages(),
},
{
id: "dotnet.search",
title: "Search NuGet Packages",
category: "Build",
hidden: true,
run: ({ arg }) => {
const a = arg as { query: string; exact?: boolean };
return searchPackages(a.query, a.exact);
...(["build", "restore", "clean"] as const).map((op) => ({
id: `dotnet.${op}`,
title: op === "build" ? "Build .NET Project" : op === "restore" ? "Restore .NET Project" : "Clean .NET Project",
category: "Build",
when: "projectOpen",
run: ({ arg }: { arg?: unknown }) => buildDotnet(op, arg),
})),
{
id: "dotnet.packages",
title: "Refresh NuGet Packages",
category: "Build",
when: "projectOpen",
run: () => {
toolWindowService().show(NUGET, true);
return listPackages();
},
},
},
{
id: "dotnet.packageChange",
title: "Change NuGet Package",
category: "Build",
hidden: true,
run: ({ arg }) => {
const a = arg as { id: string; version: string | null };
return changePackage(a.id, a.version);
{
id: "dotnet.search",
title: "Search NuGet Packages",
category: "Build",
hidden: true,
run: ({ arg }) => {
const a = arg as { query: string; exact?: boolean };
return searchPackages(a.query, a.exact);
},
},
},
{
id: "dotnet.discover",
title: "Discover .NET Tests",
category: "Run",
when: "projectOpen",
run: () => discoverTests(),
},
{
id: "dotnet.test",
title: "Run .NET Tests",
category: "Run",
when: "projectOpen",
run: async ({ arg }) => {
await runTests(typeof arg === "string" ? arg : undefined);
{
id: "dotnet.packageChange",
title: "Change NuGet Package",
category: "Build",
hidden: true,
run: ({ arg }) => {
const a = arg as { id: string; version: string | null };
return changePackage(a.id, a.version);
},
},
},
{
id: "dotnet.installTrx",
title: "Install TRX reporting",
category: "Build",
when: "projectOpen",
run: () => installTrx(),
},
]);
const offProject = useProject.subscribe((s, old) => {
if (s.project?.root !== old.project?.root) resetDotnet();
});
{
id: "dotnet.discover",
title: "Discover .NET Tests",
category: "Run",
when: "projectOpen",
run: () => discoverTests(),
},
{
id: "dotnet.test",
title: "Run .NET Tests",
category: "Run",
when: "projectOpen",
run: async ({ arg }) => {
await runTests(typeof arg === "string" ? arg : undefined);
},
},
{
id: "dotnet.installTrx",
title: "Install TRX reporting",
category: "Build",
when: "projectOpen",
run: () => installTrx(),
},
]),
useProject.subscribe((s, old) => {
if (s.project?.root !== old.project?.root) resetDotnet();
}),
// #5635: build / restore / clean act on the right-clicked solution or project.
registerMenuGroup({
id: "dotnet.project",
menus: ["projectView"],
order: 45,
items: (_menu, { paths, dirs }) => {
const path = paths.length === 1 && !dirs?.[0] ? paths[0]! : null;
if (!path || !(isDotnetProjectPath(path) || isDotnetSolutionPath(path))) return [];
return [
{ kind: "action", action: "dotnet.build", arg: path },
{ kind: "action", action: "dotnet.restore", arg: path },
{ kind: "action", action: "dotnet.clean", arg: path },
];
},
}),
];
return () => {
resetDotnet();
offProject();
offActions();
offWindow();
disposers.reverse().forEach((d) => d());
};
}
+124
Переглянути файл
@@ -3,6 +3,7 @@ import {
buildDotnet,
cancelDotnet,
discoveredTests,
discoverTests,
packageList,
reloadDotnet,
resetDotnet,
@@ -11,6 +12,7 @@ import {
} from "./store";
import * as platform from "@/platform/dotnet";
import { useProject } from "@/platform/project";
import { EditorService, provideEditorService, provideProjectViewSelection } from "@/workbench/contributions";
afterEach(() => {
resetDotnet();
@@ -192,3 +194,125 @@ describe("real dotnet discovery output", () => {
]);
});
});
describe("acting on the context before the model was ever loaded (#5635)", () => {
const path = "/repo/src/App/App.csproj";
const project: platform.DotnetProject = {
path,
name: "App",
frameworks: ["net9.0"],
configurations: ["Debug"],
references: [],
packages: [],
test: true,
runner: "vstest",
adapter: "mstest",
trx: false,
};
let offSelection = () => {};
const selectInProjectView = (...paths: string[]) => {
offSelection();
offSelection = provideProjectViewSelection(() => paths);
};
const previousProject = useProject.getState().project;
beforeEach(() => {
useProject.setState({ project: { root: "/repo" } as NonNullable<typeof previousProject> });
// A fresh session: the Project view shows a source file, that file is open in the editor.
selectInProjectView("/repo/src/App/Program.cs");
provideEditorService({ activePath: () => "/repo/src/App/Program.cs" } as unknown as EditorService);
});
afterEach(() => {
offSelection();
provideEditorService(undefined as unknown as EditorService);
useProject.setState({ project: previousProject });
});
it("loads the workspace once, then builds the project of the active editor's file", async () => {
const scan = vi.spyOn(platform, "dotnetWorkspace").mockResolvedValue({ projects: [project], solutions: [] });
vi.spyOn(platform, "evaluateProject").mockResolvedValue(project);
const command = vi.spyOn(platform, "dotnet").mockResolvedValue("");
await buildDotnet("build");
expect(scan).toHaveBeenCalledTimes(1);
expect(command).toHaveBeenCalledWith(
["build", path, "--configuration", "Debug", "--framework", "net9.0"],
"/repo/src/App",
expect.any(AbortSignal),
);
});
it("shares one workspace load between concurrent context actions", async () => {
const scan = vi.spyOn(platform, "dotnetWorkspace").mockResolvedValue({ projects: [project], solutions: [] });
vi.spyOn(platform, "evaluateProject").mockResolvedValue(project);
vi.spyOn(platform, "dotnet").mockResolvedValue("");
await Promise.all([buildDotnet("build"), buildDotnet("build")]);
expect(scan).toHaveBeenCalledTimes(1);
});
it("discovers the tests of the context without a loaded model", async () => {
vi.spyOn(platform, "dotnetWorkspace").mockResolvedValue({ projects: [project], solutions: [] });
const command = vi.spyOn(platform, "dotnet").mockResolvedValue("");
await discoverTests();
expect(command).toHaveBeenCalledWith(
expect.arrayContaining(["--list-tests"]),
"/repo/src/App",
expect.any(AbortSignal),
);
});
it("builds a project selected in the Project view without loading the model", async () => {
selectInProjectView(path);
const scan = vi.spyOn(platform, "dotnetWorkspace");
const command = vi.spyOn(platform, "dotnet").mockResolvedValue("");
await buildDotnet("build");
expect(scan).not.toHaveBeenCalled();
expect(command).toHaveBeenCalledWith(
["build", path, "--configuration", "Debug"],
"/repo/src/App",
expect.any(AbortSignal),
);
});
it("scans once and stays a no-op in a workspace without .NET projects", async () => {
const scan = vi.spyOn(platform, "dotnetWorkspace").mockResolvedValue({ projects: [], solutions: [] });
const command = vi.spyOn(platform, "dotnet").mockResolvedValue("");
await buildDotnet("build");
await buildDotnet("build");
expect(scan).toHaveBeenCalledTimes(1);
expect(command).not.toHaveBeenCalled();
});
it("retries the workspace load on the next action after a failed scan", async () => {
const scan = vi
.spyOn(platform, "dotnetWorkspace")
.mockRejectedValueOnce(new Error("scan failed"))
.mockResolvedValue({ projects: [project], solutions: [] });
vi.spyOn(platform, "evaluateProject").mockResolvedValue(project);
const command = vi.spyOn(platform, "dotnet").mockResolvedValue("");
await buildDotnet("build");
expect(useDotnet.getState().error).toContain("scan failed");
expect(scan).toHaveBeenCalledTimes(1);
await buildDotnet("build");
expect(scan).toHaveBeenCalledTimes(2);
expect(useDotnet.getState().error).toBe("");
expect(command).toHaveBeenCalledWith(
["build", path, "--configuration", "Debug", "--framework", "net9.0"],
"/repo/src/App",
expect.any(AbortSignal),
);
});
});
+119 -18
Переглянути файл
@@ -6,11 +6,14 @@ import {
evaluateProject,
dotnetTestArgs,
jsonOutput,
type DotnetProject,
type DotnetWorkspace,
} from "@/platform/dotnet";
import { dirname, useProject } from "@/platform/project";
import type { RunConfig } from "@/platform/ipc";
import { tx } from "@/platform/i18n";
import { maybeEditorService, projectViewSelection } from "@/workbench/contributions";
import { contextDotnetTarget, isDotnetProjectPath, isDotnetSolutionPath } from "./target";
export interface Package {
id: string;
@@ -47,14 +50,80 @@ const initial: State = {
export const useDotnet = create<State>(() => initial);
let controller: AbortController | undefined;
let generation = 0;
/** The workspace scan a context action starts when the model was never loaded; concurrent calls share it (#5635). */
let contextScan: Promise<unknown> | undefined;
export function resetDotnet() {
generation++;
controller?.abort();
contextScan = undefined;
useDotnet.setState(initial);
}
export const selectedProject = () =>
useDotnet.getState().model.projects.find((p) => p.path === useDotnet.getState().selected);
/**
* The .NET project or solution of the current context (#5635): an explicit file (the
* Project view context menu), else the Project view's selected `.csproj` / `.sln`, else
* the project of the active editor's file, else the solution — or, in a workspace with
* no solution, the project selected in the NuGet window.
*/
async function contextTarget(arg?: unknown): Promise<string | null> {
if (typeof arg === "string" && arg) return arg;
const resolve = () => {
return (
contextDotnetTarget({
selected: projectViewSelection(),
editorFile: maybeEditorService()?.activePath() ?? null,
model: useDotnet.getState().model,
}) ??
(useDotnet.getState().selected || null)
);
};
// A selected `.csproj` / `.sln` resolves without the model. Otherwise a fresh
// session may never have scanned the workspace yet (#5635): load it once
// instead of silently doing nothing. A workspace without .NET stays a no-op
// after that single scan, and a selected file never triggers one.
const target = resolve();
if (target) return target;
const { model } = useDotnet.getState();
if (model.projects.length || model.solutions.length || !useProject.getState().project?.root) return null;
await ensureDotnetModel();
return resolve();
}
/**
* Loads the workspace model unless it is loaded: the NuGet window on mount and the context
* actions share one scan (#5635), so opening the window while an action resolves its target
* does not scan twice.
*/
export async function ensureDotnetModel(): Promise<void> {
const { model } = useDotnet.getState();
if (model.projects.length || model.solutions.length || !useProject.getState().project?.root) return;
const scan = (contextScan ??= Promise.resolve(reloadDotnet()));
try {
await scan;
} finally {
// A failed scan must not disable the context actions for the rest of the
// session (#5635): drop it so the next caller starts a new one. A scan
// that completed finds the model loaded — or, in a workspace without
// .NET, no error — and keeps its single-scan no-op.
if (contextScan === scan) {
const { model, error } = useDotnet.getState();
if (error && !model.projects.length && !model.solutions.length) contextScan = undefined;
}
}
}
/** The context's target as an evaluated project: a solution has no single project, so the selected one stands in. */
async function contextProject(): Promise<DotnetProject | null> {
const target = await contextTarget();
const s = useDotnet.getState();
const path = target && !isDotnetSolutionPath(target) ? target : s.selected;
const known = s.model.projects.find((p) => p.path === path);
if (known || !path) return known ?? null;
return isDotnetProjectPath(path) ? evaluateProject(path, s.configuration, "") : null;
}
async function task(work: (signal: AbortSignal) => Promise<Partial<State>>) {
controller?.abort();
const current = ++generation;
@@ -133,27 +202,57 @@ export function selectDotnet(path: string, configuration?: string, framework?: s
});
}
export function buildDotnet(operation: "build" | "restore" | "clean") {
const p = selectedProject();
if (!p) return;
export async function buildDotnet(operation: "build" | "restore" | "clean", arg?: unknown) {
const target = await contextTarget(arg);
if (!target) return;
// A solution builds as a whole: `dotnet` takes the `.sln` directly, there is no
// project to re-evaluate afterwards.
if (isDotnetSolutionPath(target)) {
const { configuration } = useDotnet.getState();
return task(async (signal) => ({
output: await dotnet(
[
operation,
target,
...(operation === "restore" ? [`-p:Configuration=${configuration}`] : ["--configuration", configuration]),
],
dirname(target),
signal,
),
}));
}
const selected = selectedProject();
const { framework, configuration } = useDotnet.getState();
// The selected project keeps its chosen configuration and framework; another
// project builds with its own defaults.
if (selected?.path !== target)
return task(async (signal) => {
const output = await dotnet([operation, target, "--configuration", "Debug"], dirname(target), signal);
const model = useDotnet.getState().model;
if (!model.projects.some((p) => p.path === target)) return { output };
const project = await evaluateProject(target, "Debug", "", signal);
return {
output,
model: { ...model, projects: model.projects.map((item) => (item.path === target ? project : item)) },
};
});
return task(async (signal) => {
const output = await dotnet(
[
operation,
p.path,
target,
...(operation === "restore"
? [`-p:Configuration=${configuration}`]
: ["--configuration", configuration, ...(framework ? ["--framework", framework] : [])]),
],
dirname(p.path),
dirname(target),
signal,
);
const project = await evaluateProject(p.path, configuration, framework, signal);
const project = await evaluateProject(target, configuration, framework, signal);
const model = useDotnet.getState().model;
return {
output,
model: { ...model, projects: model.projects.map((item) => (item.path === p.path ? project : item)) },
model: { ...model, projects: model.projects.map((item) => (item.path === target ? project : item)) },
};
});
}
@@ -285,23 +384,25 @@ export function discoveredTests(output: string): string[] {
}
return [...tests];
}
export function discoverTests() {
const p = selectedProject();
export async function discoverTests() {
const p = await contextProject();
if (!p) return;
const s = useDotnet.getState();
const own = p.path === s.selected;
const framework = own ? s.framework : "";
const configuration = own ? s.configuration : "Debug";
return task(async (signal) => {
const output = await dotnet(
dotnetTestArgs(p, s.framework, ["--list-tests"], s.configuration),
dirname(p.path),
signal,
);
const output = await dotnet(dotnetTestArgs(p, framework, ["--list-tests"], configuration), dirname(p.path), signal);
return { output, tests: discoveredTests(output) };
});
}
export function runTests(test?: string) {
const p = selectedProject();
export async function runTests(test?: string) {
const p = await contextProject();
if (!p) return;
const s = useDotnet.getState();
const own = p.path === s.selected;
const framework = own ? s.framework : "";
const configuration = own ? s.configuration : "Debug";
const method = test?.replace(/\(.*$/, "").trim();
const config: RunConfig = {
id: `dotnet:${p.path}:tests`,
@@ -316,8 +417,8 @@ export function runTests(test?: string) {
debugAdapter: null,
params: {
project: p.path,
framework: s.framework,
configuration: s.configuration,
framework,
configuration,
runner: p.runner,
adapter: p.adapter,
programArgs: "",
+86
Переглянути файл
@@ -0,0 +1,86 @@
import { describe, expect, it } from "vitest";
import { contextDotnetTarget, type DotnetTargetContext } from "./target";
const project = (path: string) => ({ path, name: path.split("/").at(-1) ?? path });
const solution = (path: string, projects: string[]) => ({ path, projects });
const ctx = (over: Partial<DotnetTargetContext> = {}): DotnetTargetContext => ({
selected: [],
editorFile: null,
model: { projects: [], solutions: [] },
...over,
});
describe("the .NET target of the current context", () => {
it("builds the project file selected in the Project tool window", () => {
const c = ctx({
selected: ["/repo/src/App/App.csproj"],
editorFile: "/repo/other/Program.cs",
model: {
projects: [project("/repo/src/App/App.csproj"), project("/repo/other/Other.csproj")],
solutions: [solution("/repo/Demo.sln", ["/repo/src/App/App.csproj"])],
},
});
expect(contextDotnetTarget(c)).toBe("/repo/src/App/App.csproj");
});
it("builds the F# project or the solution selected in the Project tool window", () => {
expect(contextDotnetTarget(ctx({ selected: ["/repo/App.fsproj"] }))).toBe("/repo/App.fsproj");
expect(contextDotnetTarget(ctx({ selected: ["/repo/Demo.sln"] }))).toBe("/repo/Demo.sln");
expect(contextDotnetTarget(ctx({ selected: ["/repo/Demo.slnx"] }))).toBe("/repo/Demo.slnx");
});
it("ignores a selection that is no .NET project or solution file", () => {
const c = ctx({
selected: ["/repo/src/App/Program.cs", "/repo/README.md"],
editorFile: "/repo/src/App/Program.cs",
model: {
projects: [project("/repo/src/App/App.csproj")],
solutions: [solution("/repo/Demo.sln", ["/repo/src/App/App.csproj"])],
},
});
expect(contextDotnetTarget(c)).toBe("/repo/src/App/App.csproj");
});
it("builds the project of the active editor's file, the deepest one when projects nest", () => {
const model = {
projects: [project("/repo/src/App/App.csproj"), project("/repo/src/App.Tests/App.Tests.csproj")],
solutions: [solution("/repo/Demo.sln", [])],
};
expect(contextDotnetTarget(ctx({ editorFile: "/repo/src/App/Program.cs", model: structuredClone(model) }))).toBe(
"/repo/src/App/App.csproj",
);
expect(contextDotnetTarget(ctx({ editorFile: "/repo/src/App.Tests/Unit.cs", model: structuredClone(model) }))).toBe(
"/repo/src/App.Tests/App.Tests.csproj",
);
});
it("does not confuse a project directory with a longer sibling name", () => {
const model = {
projects: [project("/repo/src/App/App.csproj")],
solutions: [solution("/repo/Demo.sln", [])],
};
expect(contextDotnetTarget(ctx({ editorFile: "/repo/src/AppOther/Program.cs", model }))).toBe("/repo/Demo.sln");
});
it("falls back to the first solution when the editor file matches no project", () => {
const model = {
projects: [project("/repo/src/App/App.csproj")],
solutions: [solution("/repo/First.sln", ["/repo/src/App/App.csproj"]), solution("/repo/Second.sln", [])],
};
expect(contextDotnetTarget(ctx({ editorFile: "/repo/notes.txt", model }))).toBe("/repo/First.sln");
});
it("falls back to the first solution with neither a selection nor an editor file", () => {
const model = {
projects: [project("/repo/src/App/App.csproj")],
solutions: [solution("/repo/Demo.sln", [])],
};
expect(contextDotnetTarget(ctx({ model }))).toBe("/repo/Demo.sln");
});
it("finds nothing without a selection, an editor file or a solution", () => {
expect(contextDotnetTarget(ctx())).toBeNull();
expect(contextDotnetTarget(ctx({ model: { projects: [project("/repo/App.csproj")], solutions: [] } }))).toBeNull();
});
});
+40
Переглянути файл
@@ -0,0 +1,40 @@
/**
* Which .NET project or solution the current context means (#5635): the Project
* tool window's selected `.csproj` / `.fsproj` / `.sln`, else the project of the
* active editor's file, else the solution. The Project view context menu passes
* its file explicitly; build, restore, clean and test resolve what is left.
*/
import { dirname } from "@/platform/project";
export interface DotnetTargetContext {
/** Paths selected in the Project tool window, lead first. */
selected: string[];
/** The active editor's file, when one is open. */
editorFile: string | null;
/** The discovered .NET workspace; only the paths matter here. */
model: {
projects: Array<{ path: string }>;
solutions: Array<{ path: string }>;
};
}
export const isDotnetSolutionPath = (path: string) => /\.slnx?$/i.test(path);
export const isDotnetProjectPath = (path: string) => /\.(?:cs|fs|vb)proj$/i.test(path);
/** The project of `file`: the deepest enclosing project directory, if any. */
function projectOf(file: string, projects: DotnetTargetContext["model"]["projects"]) {
const around = projects
.filter((p) => file.startsWith(`${dirname(p.path)}/`))
.sort((a, b) => dirname(b.path).length - dirname(a.path).length);
return around[0]?.path ?? null;
}
export function contextDotnetTarget(ctx: DotnetTargetContext): string | null {
const picked = ctx.selected.find((p) => isDotnetProjectPath(p) || isDotnetSolutionPath(p));
if (picked) return picked;
if (ctx.editorFile) {
const project = projectOf(ctx.editorFile, ctx.model.projects);
if (project) return project;
}
return ctx.model.solutions[0]?.path ?? null;
}
+89
Переглянути файл
@@ -0,0 +1,89 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { getAction } from "@/platform/actions";
import {
provideToolWindowService,
useContributions,
menuGroupItems,
type ToolWindowService,
} from "@/workbench/contributions";
import { PROJECT_TYPES } from "@/ui/projectType";
import { activate } from "./index";
import * as store from "./store";
let dispose: () => void;
beforeEach(() => {
dispose = activate();
});
afterEach(() => {
dispose();
});
describe("standalone .NET tool window removal", () => {
it("registers no .NET tool window (no C# stripe button)", () => {
expect(useContributions.getState().toolWindows.has("dotnet")).toBe(false);
});
it("registers no command that opens it", () => {
expect(getAction("dotnet.show")).toBeUndefined();
});
it("keeps the workbench entry points for .NET operations", () => {
for (const id of [
"dotnet.reload",
"dotnet.build",
"dotnet.restore",
"dotnet.clean",
"dotnet.packages",
"dotnet.search",
"dotnet.packageChange",
"dotnet.discover",
"dotnet.test",
"dotnet.installTrx",
]) {
expect(getAction(id), id).toBeDefined();
}
});
it("registers the NuGet tool window on the bottom stripe, listed only on use", () => {
const nuget = useContributions.getState().toolWindows.get("nuget");
expect(nuget, "nuget").toBeDefined();
expect(nuget!.anchor).toBe("bottom");
expect(nuget!.stripe).toBe("onUse");
});
it("dotnet.packages opens the NuGet window", async () => {
const show = vi.fn();
provideToolWindowService({ show } as unknown as ToolWindowService);
const list = vi.spyOn(store, "listPackages").mockReturnValue(undefined);
await getAction("dotnet.packages")!.run({ ctx: {} });
expect(show).toHaveBeenCalledWith("nuget", true);
expect(list).toHaveBeenCalled();
});
it("offers Build / Restore / Clean for a solution or project file in the Project view context menu", () => {
const actions = (path: string) =>
menuGroupItems("projectView", { paths: [path], dirs: [false] }).map((i) =>
i.kind === "action" ? `${i.action} ${String(i.arg)}` : i.kind,
);
expect(actions("/repo/src/App/App.csproj")).toEqual([
"dotnet.build /repo/src/App/App.csproj",
"dotnet.restore /repo/src/App/App.csproj",
"dotnet.clean /repo/src/App/App.csproj",
"separator",
]);
expect(actions("/repo/Demo.sln")).toEqual([
"dotnet.build /repo/Demo.sln",
"dotnet.restore /repo/Demo.sln",
"dotnet.clean /repo/Demo.sln",
"separator",
]);
expect(actions("/repo/src/App/Program.cs")).toEqual([]);
});
it("keeps .NET solutions and projects visible in the Project tool window's file tree", () => {
expect(PROJECT_TYPES.dotnet.markers.some((m) => m instanceof RegExp && m.test("App.csproj"))).toBe(true);
expect(PROJECT_TYPES.dotnet.markers.some((m) => m instanceof RegExp && m.test("App.sln"))).toBe(true);
});
});
+10 -12
Переглянути файл
@@ -1744,7 +1744,6 @@
"Files left open are not restored the next time that project or a standalone file is opened.": "Files left open are not restored the next time that project or a standalone file is opened.",
"Could not read .NET test results: {error}\n": "Could not read .NET test results: {error}\n",
"Invalid TRX report": "Invalid TRX report",
".NET Workspace": ".NET Workspace",
"Reload .NET Workspace": "Reload .NET Workspace",
"Cancel .NET Operation": "Cancel .NET Operation",
"Select .NET Project": "Select .NET Project",
@@ -1757,20 +1756,10 @@
"Discover .NET Tests": "Discover .NET Tests",
"Run .NET Tests": "Run .NET Tests",
"Install TRX reporting": "Install TRX reporting",
"Project references": "Project references",
"NuGet packages": "NuGet packages",
"Refresh packages": "Refresh packages",
"Search NuGet packages": "Search NuGet packages",
"Install / Update": "Install / Update",
"Versions": "Versions",
"Transitive": "Transitive",
"Run all tests": "Run all tests",
"Install the TRX reporting extension to show MTP results in the test panel.": "Install the TRX reporting extension to show MTP results in the test panel.",
".NET output exceeded the size limit": ".NET output exceeded the size limit",
"Clean": "Clean",
"Run test": "Run test",
"Select a .NET project": "Select a .NET project",
"Project evaluation failed": "Project evaluation failed",
"dotnet exited with code {0}": "dotnet exited with code {0}",
"Microsoft.Testing.Platform was not found in the restored project.": "Microsoft.Testing.Platform was not found in the restored project.",
"Open Maven Settings": "Open Maven Settings",
@@ -4071,5 +4060,14 @@
"flutter --version did not answer in {root}.": "flutter --version did not answer in {root}.",
"Flutter {framework}": "Flutter {framework}",
"channel {channel}": "channel {channel}",
"Dart {dart}": "Dart {dart}"
"Dart {dart}": "Dart {dart}",
"NuGet Packages": "NuGet Packages",
"Refresh packages": "Refresh packages",
"Search NuGet packages": "Search NuGet packages",
"Install / Update": "Install / Update",
"Versions": "Versions",
"Transitive": "Transitive",
"Version": "Version",
"Search": "Search",
".NET project": ".NET project"
}
+7 -1
Переглянути файл
@@ -6115,5 +6115,11 @@
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Este mensaje y los posteriores se eliminan, y los archivos que el agente modificó desde entonces vuelven a como estaban antes de enviarlo. El mensaje vuelve al cuadro de texto.",
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "Esto borra toda la conversación, devuelve los archivos que el agente modificó a como estaban al empezar la tarea e inicia una nueva sesión del agente con este mensaje.",
"Resets in {resetIn}": "Se restablece en {resetIn}",
"Cannot paste {name}": "No se puede pegar {name}"
"Cannot paste {name}": "No se puede pegar {name}",
"NuGet Packages": "Paquetes NuGet",
"Refresh packages": "Actualizar paquetes",
"Search NuGet packages": "Buscar paquetes NuGet",
"Install / Update": "Instalar / actualizar",
"Versions": "Versiones",
"Transitive": "Transitivo"
}
+7 -1
Переглянути файл
@@ -5758,5 +5758,11 @@
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Ce message et les suivants sont supprimés, et les fichiers modifiés par l'agent depuis reviennent à leur état d'avant l'envoi. Le message revient dans la zone de saisie.",
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "Cela efface toute la conversation, remet les fichiers modifiés par l'agent dans leur état du début de la tâche et démarre une nouvelle session de l'agent avec ce message.",
"Resets in {resetIn}": "Réinitialisation dans {resetIn}",
"Cannot paste {name}": "Impossible de coller {name}"
"Cannot paste {name}": "Impossible de coller {name}",
"NuGet Packages": "Packages NuGet",
"Refresh packages": "Actualiser les packages",
"Search NuGet packages": "Rechercher des packages NuGet",
"Install / Update": "Installer / mettre à jour",
"Versions": "Versions",
"Transitive": "Transitif"
}
+7 -1
Переглянути файл
@@ -6225,5 +6225,11 @@
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "이 메시지와 이후 메시지가 제거되고, 그 이후 에이전트가 변경한 파일은 메시지를 보내기 전 상태로 돌아갑니다. 메시지는 입력란으로 돌아갑니다.",
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "전체 대화를 지우고, 에이전트가 변경한 파일을 작업 시작 시점의 상태로 되돌린 뒤, 이 메시지로 새 에이전트 세션을 시작합니다.",
"Resets in {resetIn}": "{resetIn} 후 재설정",
"Cannot paste {name}": "{name}을(를) 붙여넣을 수 없습니다"
"Cannot paste {name}": "{name}을(를) 붙여넣을 수 없습니다",
"NuGet Packages": "NuGet 패키지",
"Refresh packages": "패키지 새로 고침",
"Search NuGet packages": "NuGet 패키지 검색",
"Install / Update": "설치 / 업데이트",
"Versions": "버전",
"Transitive": "전이"
}
+7 -1
Переглянути файл
@@ -5923,5 +5923,11 @@
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Ta wiadomość i kolejne zostaną usunięte, a pliki zmienione od tego czasu przez agenta wrócą do stanu sprzed jej wysłania. Wiadomość wróci do pola tekstowego.",
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "To wyczyści całą rozmowę, przywróci pliki zmienione przez agenta do stanu z początku zadania i rozpocznie nową sesję agenta z tą wiadomością.",
"Resets in {resetIn}": "Resetuje się za {resetIn}",
"Cannot paste {name}": "Nie można wkleić {name}"
"Cannot paste {name}": "Nie można wkleić {name}",
"NuGet Packages": "Pakiety NuGet",
"Refresh packages": "Odśwież pakiety",
"Search NuGet packages": "Szukaj pakietów NuGet",
"Install / Update": "Zainstaluj / zaktualizuj",
"Versions": "Wersje",
"Transitive": "Przechodnia"
}
+7 -1
Переглянути файл
@@ -5938,5 +5938,11 @@
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Esta mensagem e as seguintes são removidas, e os arquivos que o agente alterou desde então voltam a como estavam antes do envio. A mensagem volta para a caixa de texto.",
"This clears the entire conversation, puts the files the agent changed back as they were when the task started, and starts a fresh agent session with this message.": "Isso limpa toda a conversa, devolve os arquivos que o agente alterou a como estavam no início da tarefa e inicia uma nova sessão do agente com esta mensagem.",
"Resets in {resetIn}": "Redefine em {resetIn}",
"Cannot paste {name}": "Não é possível colar {name}"
"Cannot paste {name}": "Não é possível colar {name}",
"NuGet Packages": "Pacotes NuGet",
"Refresh packages": "Atualizar pacotes",
"Search NuGet packages": "Pesquisar pacotes NuGet",
"Install / Update": "Instalar / atualizar",
"Versions": "Versões",
"Transitive": "Transitivo"
}
+7 -12
Переглянути файл
@@ -8167,7 +8167,6 @@
"Open Container Log in Editor": "Открыть журнал контейнера в редакторе",
"Could not read .NET test results: {error}\n": "Не удалось прочитать результаты тестов .NET: {error}\n",
"Invalid TRX report": "Некорректный отчёт TRX",
".NET Workspace": "Рабочая область .NET",
"Reload .NET Workspace": "Перезагрузить рабочую область .NET",
"Cancel .NET Operation": "Отменить операцию .NET",
"Select .NET Project": "Выбрать проект .NET",
@@ -8180,19 +8179,9 @@
"Discover .NET Tests": "Обнаружить тесты .NET",
"Run .NET Tests": "Запустить тесты .NET",
"Install TRX reporting": "Установить отчёты TRX",
"Project references": "Ссылки проекта",
"NuGet packages": "Пакеты NuGet",
"Refresh packages": "Обновить пакеты",
"Search NuGet packages": "Поиск пакетов NuGet",
"Install / Update": "Установить / Обновить",
"Versions": "Версии",
"Transitive": "Транзитивные",
"Run all tests": "Запустить все тесты",
"Install the TRX reporting extension to show MTP results in the test panel.": "Установите расширение для отчётов TRX, чтобы отображать результаты MTP на панели тестов.",
".NET output exceeded the size limit": "Вывод .NET превысил ограничение по размеру",
"Clean": "Очистить",
"Run test": "Запустить тест",
"Project evaluation failed": "Ошибка оценки проекта",
"dotnet exited with code {0}": "Процесс dotnet завершился с кодом {0}",
"Microsoft.Testing.Platform was not found in the restored project.": "Платформа Microsoft.Testing.Platform не найдена в восстановленном проекте.",
"Open Maven Settings": "Открыть настройки Maven",
@@ -10128,5 +10117,11 @@
"Roll Back to Here": "Откатить до этого места",
"Couldn't roll back": "Не удалось откатить",
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Это сообщение и все последующие будут удалены, а файлы, изменённые агентом с тех пор, вернутся к состоянию до его отправки. Сообщение вернётся в поле ввода.",
"Resets in {resetIn}": "Сброс через {resetIn}"
"Resets in {resetIn}": "Сброс через {resetIn}",
"NuGet Packages": "Пакеты NuGet",
"Refresh packages": "Обновить пакеты",
"Search NuGet packages": "Поиск пакетов NuGet",
"Install / Update": "Установить / Обновить",
"Versions": "Версии",
"Transitive": "Транзитивные"
}
+7 -12
Переглянути файл
@@ -1198,7 +1198,6 @@
"Files left open are not restored the next time that project or a standalone file is opened.": "Açık bırakılan dosyalar, proje veya bağımsız dosya yeniden açıldığında geri yüklenmez.",
"Could not read .NET test results: {error}\n": ".NET test sonuçları okunamadı: {error}\n",
"Invalid TRX report": "Geçersiz TRX raporu",
".NET Workspace": ".NET Çalışma Alanı",
"Reload .NET Workspace": ".NET Çalışma Alanını Yeniden Yükle",
"Cancel .NET Operation": ".NET İşlemini İptal Et",
"Select .NET Project": ".NET Projesi Seç",
@@ -1211,20 +1210,10 @@
"Discover .NET Tests": ".NET Testlerini Keşfet",
"Run .NET Tests": ".NET Testlerini Çalıştır",
"Install TRX reporting": "TRX raporlamasını yükle",
"Project references": "Proje başvuruları",
"NuGet packages": "NuGet paketleri",
"Refresh packages": "Paketleri yenile",
"Search NuGet packages": "NuGet paketlerinde ara",
"Install / Update": "Yükle / Güncelle",
"Versions": "Sürümler",
"Transitive": "Geçişli",
"Run all tests": "Tüm testleri çalıştır",
"Install the TRX reporting extension to show MTP results in the test panel.": "MTP sonuçlarını test panelinde göstermek için TRX raporlama uzantısını yükleyin.",
".NET output exceeded the size limit": ".NET çıktısı boyut sınırını aştı",
"Clean": "Temizle",
"Run test": "Testi çalıştır",
"Select a .NET project": "Bir .NET projesi seçin",
"Project evaluation failed": "Proje değerlendirmesi başarısız oldu",
"dotnet exited with code {0}": "dotnet {0} çıkış koduyla sonlandı",
"Microsoft.Testing.Platform was not found in the restored project.": "Geri yüklenen projede Microsoft.Testing.Platform bulunamadı.",
"Open Maven Settings": "Maven Ayarlarını Aç",
@@ -8785,5 +8774,11 @@
"Roll Back to Here": "Buraya Geri Al",
"Couldn't roll back": "Geri alınamadı",
"This message and the ones after it are removed, and the files the agent changed since go back to how they were before it was sent. The message returns to the composer.": "Bu mesaj ve sonrakiler kaldırılır; ajanın o zamandan beri değiştirdiği dosyalar mesaj gönderilmeden önceki hâline döner. Mesaj yazma alanına geri konur.",
"Resets in {resetIn}": "{resetIn} sonra sıfırlanır"
"Resets in {resetIn}": "{resetIn} sonra sıfırlanır",
"NuGet Packages": "NuGet Paketleri",
"Refresh packages": "Paketleri yenile",
"Search NuGet packages": "NuGet paketlerinde ara",
"Install / Update": "Yükle / Güncelle",
"Versions": "Sürümler",
"Transitive": "Geçişli"
}
+7 -12
Переглянути файл
@@ -7651,7 +7651,6 @@
"Open Container Log in Editor": "在編輯器中開啟容器記錄",
"Could not read .NET test results: {error}\n": "無法讀取 .NET 測試結果:{error}\n",
"Invalid TRX report": "無效的 TRX 報告",
".NET Workspace": ".NET 工作區",
"Reload .NET Workspace": "重新載入 .NET 工作區",
"Cancel .NET Operation": "取消 .NET 操作",
"Select .NET Project": "選擇 .NET 專案",
@@ -7664,19 +7663,9 @@
"Discover .NET Tests": "發現 .NET 測試",
"Run .NET Tests": "執行 .NET 測試",
"Install TRX reporting": "安裝 TRX 報告支援",
"Project references": "專案引用",
"NuGet packages": "NuGet 包",
"Refresh packages": "重新整理包清單",
"Search NuGet packages": "搜尋 NuGet 包",
"Install / Update": "安裝 / 更新",
"Versions": "版本",
"Transitive": "間接依賴",
"Run all tests": "執行所有測試",
"Install the TRX reporting extension to show MTP results in the test panel.": "安裝 TRX 報告擴充功能,以在測試面板中顯示 MTP 結果。",
".NET output exceeded the size limit": ".NET 輸出超過大小限制",
"Clean": "清理",
"Run test": "執行測試",
"Project evaluation failed": "專案求值失敗",
"dotnet exited with code {0}": "dotnet 已結束,結束碼 {0}",
"Microsoft.Testing.Platform was not found in the restored project.": "還原後的專案中未找到 Microsoft.Testing.Platform。",
"Open Maven Settings": "開啟 Maven 設定",
@@ -9316,5 +9305,11 @@
"Already in the project": "已在專案中",
"{name} is inside the opened project, so its sources are already part of it.": "{name} 位於已開啟的專案內,其原始碼已屬於該專案。",
"{name} has no pom.xml or Gradle build file. Attach it to this project as another root? Its source folders are detected automatically.": "{name} 沒有 pom.xml 或 Gradle 建置檔案。要將其作為另一個根附加到此專案嗎?其中的原始碼目錄會自動識別。",
"Resets in {resetIn}": "{resetIn} 後重設"
"Resets in {resetIn}": "{resetIn} 後重設",
"NuGet Packages": "NuGet 包",
"Refresh packages": "重新整理包清單",
"Search NuGet packages": "搜尋 NuGet 包",
"Install / Update": "安裝 / 更新",
"Versions": "版本",
"Transitive": "間接依賴"
}
+7 -12
Переглянути файл
@@ -8269,7 +8269,6 @@
"Open Container Log in Editor": "在编辑器中打开容器日志",
"Could not read .NET test results: {error}\n": "无法读取 .NET 测试结果:{error}\n",
"Invalid TRX report": "无效的 TRX 报告",
".NET Workspace": ".NET 工作区",
"Reload .NET Workspace": "重新加载 .NET 工作区",
"Cancel .NET Operation": "取消 .NET 操作",
"Select .NET Project": "选择 .NET 项目",
@@ -8282,19 +8281,9 @@
"Discover .NET Tests": "发现 .NET 测试",
"Run .NET Tests": "运行 .NET 测试",
"Install TRX reporting": "安装 TRX 报告支持",
"Project references": "项目引用",
"NuGet packages": "NuGet 包",
"Refresh packages": "刷新包列表",
"Search NuGet packages": "搜索 NuGet 包",
"Install / Update": "安装 / 更新",
"Versions": "版本",
"Transitive": "间接依赖",
"Run all tests": "运行所有测试",
"Install the TRX reporting extension to show MTP results in the test panel.": "安装 TRX 报告扩展,以在测试面板中显示 MTP 结果。",
".NET output exceeded the size limit": ".NET 输出超过大小限制",
"Clean": "清理",
"Run test": "运行测试",
"Project evaluation failed": "项目求值失败",
"dotnet exited with code {0}": "dotnet 已退出,退出码 {0}",
"Microsoft.Testing.Platform was not found in the restored project.": "还原后的项目中未找到 Microsoft.Testing.Platform。",
"Open Maven Settings": "打开 Maven 设置",
@@ -10383,5 +10372,11 @@
"flutter --version did not answer in {root}.": "{root} 中的 flutter --version 没有响应。",
"Flutter {framework}": "Flutter {framework}",
"channel {channel}": "渠道 {channel}",
"Dart {dart}": "Dart {dart}"
"Dart {dart}": "Dart {dart}",
"NuGet Packages": "NuGet 包",
"Refresh packages": "刷新包列表",
"Search NuGet packages": "搜索 NuGet 包",
"Install / Update": "安装 / 更新",
"Versions": "版本",
"Transitive": "间接依赖"
}