diff --git a/package.json b/package.json index b0b3c541e7..1273717f4f 100644 --- a/package.json +++ b/package.json @@ -1548,14 +1548,20 @@ "type": "boolean", "default": true, "description": "%configuration.dotnet.projects.enableFileBasedPrograms%", + "deprecationMessage": "%configuration.dotnet.projects.enableFileBasedPrograms.deprecationMessage%", "tags": [ "preview" ] }, - "dotnet.projects.enableFileBasedProgramsWhenAmbiguous": { + "dotnet.fileBasedApps.enable": { "type": "boolean", "default": true, - "description": "%configuration.dotnet.projects.enableFileBasedProgramsWhenAmbiguous%", + "description": "%configuration.dotnet.fileBasedApps.enable%" + }, + "dotnet.fileBasedApps.enableAutomaticDiscovery": { + "type": "boolean", + "default": true, + "description": "%configuration.dotnet.fileBasedApps.enableAutomaticDiscovery%", "tags": [ "preview" ] diff --git a/package.nls.json b/package.nls.json index 5828561c92..71c0b46d93 100644 --- a/package.nls.json +++ b/package.nls.json @@ -48,7 +48,9 @@ "configuration.dotnet.enableXamlTools": "Enables XAML tools when using C# Dev Kit. (Requires extension restart)", "configuration.dotnet.projects.enableAutomaticRestore": "Enables automatic NuGet restore if the extension detects assets are missing.", "configuration.dotnet.projects.enableFileBasedPrograms": "Enables the \"file-based programs\" (dotnet run app.cs) experience.", - "configuration.dotnet.projects.enableFileBasedProgramsWhenAmbiguous": "Enables the \"file-based programs\" (dotnet run app.cs) experience in files where the editor is unable to determine with certainty whether the file is a file-based program. Only respected when `dotnet.projects.enableFileBasedPrograms` is `true`.", + "configuration.dotnet.projects.enableFileBasedPrograms.deprecationMessage": "The setting 'dotnet.projects.enableFileBasedPrograms' has been deprecated in favor of 'dotnet.fileBasedApps.enable'.", + "configuration.dotnet.fileBasedApps.enable": "Enables the \"file-based apps\" (dotnet run app.cs) experience.", + "configuration.dotnet.fileBasedApps.enableAutomaticDiscovery": "Enables automatic discovery of C# file-based apps in the workspace.", "configuration.dotnet.projects.binaryLogPath": "Sets a path where MSBuild binary logs are written to when loading projects, to help diagnose loading errors.", "configuration.dotnet.server.sourceGeneratorExecution": "Controls when source generators are executed. (Requires extension restart)", "configuration.dotnet.server.sourceGeneratorExecution.balanced": "Source generators are executed after an explicit user action, including save, build, or the [Rerun source generators](command:csharp.rerunSourceGenerators) command.", diff --git a/src/shared/migrateOptions.ts b/src/shared/migrateOptions.ts index 7ddc0cb9a4..d7a7bf2c2c 100644 --- a/src/shared/migrateOptions.ts +++ b/src/shared/migrateOptions.ts @@ -104,6 +104,10 @@ export const migrateOptions = [ oldName: 'omnisharp.organizeImportsOnFormat', newName: 'dotnet.formatting.organizeImportsOnFormat', }, + { + oldName: 'dotnet.projects.enableFileBasedPrograms', + newName: 'dotnet.fileBasedApps.enable', + }, ]; export async function MigrateOptions(vscode: vscode): Promise { diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/devkit_slnWithCsproj.code-workspace b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/devkit_slnWithCsproj.code-workspace index 7b5596c70f..432d79e5cb 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/devkit_slnWithCsproj.code-workspace +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/devkit_slnWithCsproj.code-workspace @@ -8,6 +8,6 @@ "dotnet.defaultSolution": "b_SecondInOrder_SlnFile.sln", "dotnet.server.useOmnisharp": false, "dotnet.preferCSharpExtension": false, - "dotnet.projects.enableFileBasedPrograms": true + "dotnet.fileBasedApps.enable": true } } \ No newline at end of file diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/slnWithCsproj.code-workspace b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/slnWithCsproj.code-workspace index c978a74c12..869d4bce98 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/slnWithCsproj.code-workspace +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/slnWithCsproj.code-workspace @@ -8,6 +8,6 @@ "dotnet.defaultSolution": "b_SecondInOrder_SlnFile.sln", "dotnet.server.useOmnisharp": false, "dotnet.preferCSharpExtension": true, - "dotnet.projects.enableFileBasedPrograms": true + "dotnet.fileBasedApps.enable": true } } \ No newline at end of file