diff --git a/docs/core/deploying/trimming/snippets/MyTestLib6app/MyTestLib6app.csproj b/docs/core/deploying/trimming/snippets/MyTestLib6app/MyTestLib6app.csproj deleted file mode 100644 index ca1aff590cc95..0000000000000 --- a/docs/core/deploying/trimming/snippets/MyTestLib6app/MyTestLib6app.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - Exe - net8.0 - true - - link - - - \ No newline at end of file diff --git a/docs/core/deploying/trimming/snippets/MyTestLib6app/Program.cs b/docs/core/deploying/trimming/snippets/MyTestLib6app/Program.cs deleted file mode 100644 index f2b11fd28b1c7..0000000000000 --- a/docs/core/deploying/trimming/snippets/MyTestLib6app/Program.cs +++ /dev/null @@ -1,2 +0,0 @@ -// See https://aka.ms/new-console-template for more information -System.Console.WriteLine("Hello, World!"); diff --git a/docs/core/deploying/trimming/snippets/MyTestLib6app/XMLFile1.xml b/docs/core/deploying/trimming/snippets/MyTestLib6app/XMLFile1.xml deleted file mode 100644 index 92719ae4fb87b..0000000000000 --- a/docs/core/deploying/trimming/snippets/MyTestLib6app/XMLFile1.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - Exe - net8.0 - true - - link - - - - - - - - - diff --git a/docs/core/docker/snippets/7.0/App/Dockerfile b/docs/core/docker/snippets/7.0/App/Dockerfile deleted file mode 100644 index dd12541e4b7b0..0000000000000 --- a/docs/core/docker/snippets/7.0/App/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0@sha256:d32bd65cf5843f413e81f5d917057c82da99737cb1637e905a1a4bc2e7ec6c8d AS build-env -WORKDIR /App - -# Copy everything -COPY . ./ -# Restore as distinct layers -RUN dotnet restore -# Build and publish a release -RUN dotnet publish -c Release -o out - -# Build runtime image -FROM mcr.microsoft.com/dotnet/aspnet:7.0@sha256:c7d9ee6cd01afe9aa80642e577c7cec9f5d87f88e5d70bd36fd61072079bc55b -WORKDIR /App -COPY --from=build-env /App/out . -ENTRYPOINT ["dotnet", "DotNet.Docker.dll"] diff --git a/docs/core/docker/snippets/7.0/App/DotNet.Docker.csproj b/docs/core/docker/snippets/7.0/App/DotNet.Docker.csproj deleted file mode 100644 index f02677bf640fc..0000000000000 --- a/docs/core/docker/snippets/7.0/App/DotNet.Docker.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net7.0 - enable - enable - - - diff --git a/docs/core/docker/snippets/7.0/App/Program.cs b/docs/core/docker/snippets/7.0/App/Program.cs deleted file mode 100644 index 20f1c531a343b..0000000000000 --- a/docs/core/docker/snippets/7.0/App/Program.cs +++ /dev/null @@ -1,7 +0,0 @@ -var counter = 0; -var max = args.Length is not 0 ? Convert.ToInt32(args[0]) : -1; -while (max is -1 || counter < max) -{ - Console.WriteLine($"Counter: {++counter}"); - await Task.Delay(TimeSpan.FromMilliseconds(1_000)); -} diff --git a/docs/core/docker/snippets/7.0/Worker/DotNet.ContainerImage.csproj b/docs/core/docker/snippets/7.0/Worker/DotNet.ContainerImage.csproj deleted file mode 100644 index c6d8946991c64..0000000000000 --- a/docs/core/docker/snippets/7.0/Worker/DotNet.ContainerImage.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - net7.0 - enable - enable - dotnet-DotNet.ContainerImage-2e40c179-a00b-4cc9-9785-54266210b7eb - dotnet-worker-image - - - - - - - diff --git a/docs/core/docker/snippets/7.0/Worker/Program.cs b/docs/core/docker/snippets/7.0/Worker/Program.cs deleted file mode 100644 index 2e4e357e65871..0000000000000 --- a/docs/core/docker/snippets/7.0/Worker/Program.cs +++ /dev/null @@ -1,8 +0,0 @@ -using DotNet.ContainerImage; - -HostApplicationBuilder builder = Host.CreateApplicationBuilder(args); -builder.Services.AddHostedService(); - -using IHost host = builder.Build(); - -host.Run(); diff --git a/docs/core/docker/snippets/7.0/Worker/Properties/launchSettings.json b/docs/core/docker/snippets/7.0/Worker/Properties/launchSettings.json deleted file mode 100644 index 922edbaad1cba..0000000000000 --- a/docs/core/docker/snippets/7.0/Worker/Properties/launchSettings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "profiles": { - "DotNet.ContainerImage": { - "commandName": "Project", - "dotnetRunMessages": true, - "environmentVariables": { - "DOTNET_ENVIRONMENT": "Development" - } - } - } -} diff --git a/docs/core/docker/snippets/7.0/Worker/Worker.cs b/docs/core/docker/snippets/7.0/Worker/Worker.cs deleted file mode 100644 index 27f0e42cf38ae..0000000000000 --- a/docs/core/docker/snippets/7.0/Worker/Worker.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace DotNet.ContainerImage; - -public class Worker : BackgroundService -{ - private readonly ILogger _logger; - - public Worker(ILogger logger) - { - _logger = logger; - } - - protected override async Task ExecuteAsync(CancellationToken stoppingToken) - { - while (!stoppingToken.IsCancellationRequested) - { - _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now); - await Task.Delay(1000, stoppingToken); - } - } -} diff --git a/docs/core/docker/snippets/7.0/Worker/appsettings.Development.json b/docs/core/docker/snippets/7.0/Worker/appsettings.Development.json deleted file mode 100644 index b2dcdb67421cd..0000000000000 --- a/docs/core/docker/snippets/7.0/Worker/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/docs/core/docker/snippets/7.0/Worker/appsettings.json b/docs/core/docker/snippets/7.0/Worker/appsettings.json deleted file mode 100644 index b2dcdb67421cd..0000000000000 --- a/docs/core/docker/snippets/7.0/Worker/appsettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/docs/standard/serialization/system-text-json/snippets/configure-options/csharp/ReuseOptionsInstances.cs b/docs/standard/serialization/system-text-json/snippets/configure-options/csharp/ReuseOptionsInstances.cs deleted file mode 100644 index 0364f25ba5f71..0000000000000 --- a/docs/standard/serialization/system-text-json/snippets/configure-options/csharp/ReuseOptionsInstances.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Diagnostics; -using System.Text.Json; - -namespace OptionsPerfDemo -{ - public record Forecast(DateTime Date, int TemperatureC, string Summary); - - public class Program - { - public static void Main() - { - Forecast forecast = new(DateTime.Now, 40, "Hot"); - JsonSerializerOptions options = new() { WriteIndented = true }; - int iterations = 100000; - - var watch = Stopwatch.StartNew(); - for (int i = 0; i < iterations; i++) - { - Serialize(forecast, options); - } - watch.Stop(); - Console.WriteLine($"Elapsed time using one options instance: {watch.ElapsedMilliseconds}"); - - watch = Stopwatch.StartNew(); - for (int i = 0; i < iterations; i++) - { - Serialize(forecast); - } - watch.Stop(); - Console.WriteLine($"Elapsed time creating new options instances: {watch.ElapsedMilliseconds}"); - } - - private static void Serialize(Forecast forecast, JsonSerializerOptions? options = null) - { - _ = JsonSerializer.Serialize( - forecast, - options ?? new JsonSerializerOptions() { WriteIndented = true }); - } - } -} - -// Produces output like the following example: -// -//Elapsed time using one options instance: 190 -//Elapsed time creating new options instances: 40140 diff --git a/docs/standard/serialization/system-text-json/snippets/configure-options/csharp/SystemTextJsonOptions.csproj b/docs/standard/serialization/system-text-json/snippets/configure-options/csharp/SystemTextJsonOptions.csproj deleted file mode 100644 index f704bf4988fa6..0000000000000 --- a/docs/standard/serialization/system-text-json/snippets/configure-options/csharp/SystemTextJsonOptions.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - Exe - net8.0 - enable - enable - - -