Skip to content

Commit 56b1bfc

Browse files
authored
Merge pull request #36682 from dotnet/main
Merge to Live
2 parents 9477da9 + f91085e commit 56b1bfc

4 files changed

Lines changed: 48 additions & 60 deletions

File tree

aspnetcore/blazor/webassembly-build-tools-and-aot.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ The following list shows which workload to install for each .NET SDK, depending
4747
* Targeting .NET 8 requires `wasm-tools-net8`.
4848
* Using the .NET 8 SDK: Targeting .NET 8 requires `wasm-tools`.
4949

50-
The Emscripten compiler toolchain depends on [LLVM](https://llvm.org/), [Node.js](https://nodejs.org), and [Python](https://www.python.org/), which are installed by default with the .NET WebAssembly build tools workload on Windows and macOS. Python isn't installed for Linux users by default, so Linux users should [download Python for Linux/Unix](https://www.python.org/downloads/source/) and manually install it on their system.
50+
The Emscripten compiler toolchain depends on [Python](https://www.python.org/), which is bundled by default with the .NET WebAssembly build tools workload on Windows and macOS.
51+
Python isn't bundled for Linux users, resulting in "unable to find python in $PATH" errors if Python isn't available. Linux users should install Python through their package manager or [download Python for Linux/Unix](https://www.python.org/downloads/source/) and manually install it on their system so that it is available in `$PATH`.
5152

5253
## Ahead-of-time (AOT) compilation
5354

aspnetcore/fundamentals/configuration/index.md

Lines changed: 41 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use the Configuration API to configure app settings in
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: tdykstra
77
ms.custom: mvc
8-
ms.date: 01/22/2026
8+
ms.date: 01/23/2026
99
uid: fundamentals/configuration/index
1010
---
1111
# Configuration in ASP.NET Core
@@ -234,14 +234,14 @@ public class Startup
234234

235235
public void ConfigureServices(IServiceCollection services)
236236
{
237-
var connectionString = Config["ConnectionStrings.DefaultConnection"]}");
237+
var connectionString = Config["ConnectionStrings.DefaultConnection"];
238238

239239
...
240240
}
241241

242242
public void Configure(...)
243243
{
244-
var defaultLogLevel = Config["Logging:LogLevel:Default"]}");
244+
var defaultLogLevel = Config["Logging:LogLevel:Default"];
245245

246246
...
247247
}
@@ -306,23 +306,23 @@ The Configuration API reads hierarchical configuration data by flattening the hi
306306
Consider the following hierarchical configuration data:
307307

308308
* :::no-loc text="ConnectionStrings":::
309-
* :::no-loc text="DefaultConnection (Value = ":::no-loc text="Data Source=LocalSqlServer\\MSSQLDev;":::")
309+
* :::no-loc text="DefaultConnection (Value = 'Data Source=LocalSqlServer\\MSSQLDev;')":::
310310
* :::no-loc text="Logging":::
311311
* :::no-loc text="LogLevel":::
312-
* :::no-loc text="Default"::: (Value = :::no-loc text="Information":::)
313-
* :::no-loc text="Microsoft"::: (Value = :::no-loc text="Warning":::)
314-
* :::no-loc text="Microsoft.Hosting.Lifetime"::: (Value = :::no-loc text="Information":::)
315-
* :::no-loc text="AllowedHosts"::: (Value = *)
312+
* :::no-loc text="Default (Value = 'Information')":::
313+
* :::no-loc text="Microsoft (Value = 'Warning')":::
314+
* :::no-loc text="Microsoft.Hosting.Lifetime (Value = 'Information')":::
315+
* :::no-loc text="AllowedHosts (Value = '*')":::
316316

317317
The following table displays the keys used to recover the values in the preceding configuration data. The delimiter isn't required for :::no-loc text="AllowedHosts":::.
318318

319319
Key (colon delimiter) | Key (double-underscore delimiter)
320320
--- | ---
321-
ConnectionStrings:DefaultConnection | ConnectionStrings__DefaultConnection
322-
Logging:LogLevel:Default | Logging__LogLevel__Default
323-
Logging:LogLevel:Microsoft | Logging__LogLevel__Microsoft
324-
Logging:LogLevel:Microsoft.Hosting.Lifetime | Logging__LogLevel__Microsoft.Hosting.Lifetime
325-
AllowedHosts | AllowedHosts
321+
`ConnectionStrings:DefaultConnection` | `ConnectionStrings__DefaultConnection`
322+
`Logging:LogLevel:Default` | `Logging__LogLevel__Default`
323+
`Logging:LogLevel:Microsoft` | `Logging__LogLevel__Microsoft`
324+
`Logging:LogLevel:Microsoft.Hosting.Lifetime` | `Logging__LogLevel__Microsoft.Hosting.Lifetime`
325+
`AllowedHosts` | `AllowedHosts`
326326

327327
> [!NOTE]
328328
> In complex app configuration scenarios, we recommend grouping and reading related hierarchical configuration data using the [Options pattern](xref:fundamentals/configuration/options).
@@ -416,7 +416,7 @@ Provider | Provides configuration from…
416416
[Custom configuration provider](#custom-configuration-provider) | Custom source
417417
[Environment Variables Configuration Provider](#environment-variables-configuration-provider) | Environment variables
418418
[File Configuration Provider](#file-configuration-provider) | INI, JSON, and XML files
419-
[Key-per-file Configuration Provider](#key-per-file-configuration-provider) | Directory files
419+
[Key-Per-File Configuration Provider](#key-per-file-configuration-provider) | Directory files
420420
[Memory Configuration Provider](#memory-configuration-provider) | In-memory collections
421421
[User secrets](xref:security/app-secrets) | File in the user profile directory
422422

@@ -986,9 +986,9 @@ The previous configuration loads the following keys with `value`:
986986
* `key:attribute`
987987
* `section:key:attribute`
988988

989-
## Key-per-file Configuration Provider
989+
## Key-Per-File Configuration Provider
990990

991-
The <xref:Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationProvider> uses a directory's files as configuration key-value pairs. The key is the file name. The value contains the file's contents. The Key-per-file Configuration Provider is used in Docker hosting scenarios.
991+
The <xref:Microsoft.Extensions.Configuration.KeyPerFile.KeyPerFileConfigurationProvider> uses a directory's files as configuration key-value pairs. The key is the file name. The value contains the file's contents. The Key-Per-File Configuration Provider is used in Docker hosting scenarios.
992992

993993
To activate key-per-file configuration, call the <xref:Microsoft.Extensions.Configuration.KeyPerFileConfigurationBuilderExtensions.AddKeyPerFile%2A> extension method on an instance of <xref:Microsoft.Extensions.Configuration.ConfigurationBuilder>. The `directoryPath` to the files must be an absolute path.
994994

@@ -1203,10 +1203,10 @@ spaces at the ends of the lines when editing the following content.
12031203
12041204
-->
12051205

1206-
> no-loc text="subsection0:key0 value: value200":::
1207-
> no-loc text="subsection0:key1 value: value201":::
1208-
> no-loc text="subsection1:key0 value: value210":::
1209-
> no-loc text="subsection1:key1 value: value211":::
1206+
> :::no-loc text="subsection0:key0 value: value200":::
1207+
> :::no-loc text="subsection0:key1 value: value201":::
1208+
> :::no-loc text="subsection1:key0 value: value210":::
1209+
> :::no-loc text="subsection1:key1 value: value211":::
12101210
12111211
## Bind an array
12121212

@@ -1381,7 +1381,7 @@ public class Program
13811381
{
13821382
config.AddInMemoryCollection(arrayDict);
13831383
config.AddJsonFile("Value3.json",
1384-
optional: false, reloadOnChange: false);
1384+
optional: false, reloadOnChange: false);
13851385
})
13861386
.ConfigureWebHostDefaults(webBuilder =>
13871387
{
@@ -1529,46 +1529,41 @@ Create the custom configuration provider by inheriting from <xref:Microsoft.Exte
15291529
::: moniker range=">= aspnetcore-6.0"
15301530

15311531
```csharp
1532-
public class EFConfigurationProvider : ConfigurationProvider
1533-
{
1534-
public EFConfigurationProvider(Action<DbContextOptionsBuilder> optionsAction)
1535-
{
1536-
OptionsAction = optionsAction;
1537-
}
1538-
1539-
Action<DbContextOptionsBuilder> OptionsAction { get; }
1532+
using Microsoft.EntityFrameworkCore;
15401533

1534+
public class EFConfigurationProvider(Action<DbContextOptionsBuilder> optionsAction) : ConfigurationProvider
1535+
{
15411536
public override void Load()
15421537
{
15431538
var builder = new DbContextOptionsBuilder<EFConfigurationContext>();
15441539

1545-
OptionsAction(builder);
1540+
optionsAction(builder);
15461541

1547-
using (var dbContext = new EFConfigurationContext(builder.Options))
1548-
{
1549-
if (dbContext == null || dbContext.Values == null)
1550-
{
1551-
throw new Exception("Null DB context");
1552-
}
1553-
dbContext.Database.EnsureCreated();
1542+
using var dbContext = new EFConfigurationContext(builder.Options);
15541543

1555-
Data = !dbContext.Values.Any()
1556-
? CreateAndSaveDefaultValues(dbContext)
1557-
: dbContext.Values.ToDictionary(c => c.Id, c => c.Value);
1544+
if (dbContext == null || dbContext.Values == null)
1545+
{
1546+
throw new Exception("Null DB context");
15581547
}
1548+
1549+
dbContext.Database.EnsureCreated();
1550+
1551+
Data = !dbContext.Values.Any()
1552+
? CreateAndSaveDefaultValues(dbContext)
1553+
: dbContext.Values.ToDictionary(c => c.Id, c => c.Value);
15591554
}
15601555

1561-
private static IDictionary<string, string> CreateAndSaveDefaultValues(
1556+
private static Dictionary<string, string> CreateAndSaveDefaultValues(
15621557
EFConfigurationContext dbContext)
15631558
{
15641559
// Quotes (c)2005 Universal Pictures: Serenity
15651560
// https://www.uphe.com/movies/serenity-2005
15661561
var configValues =
15671562
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
15681563
{
1569-
{ "quote1", "I aim to misbehave." },
1570-
{ "quote2", "I swallowed a bug." },
1571-
{ "quote3", "You can't stop the signal, Mal." }
1564+
{ "quote1", "I aim to misbehave." },
1565+
{ "quote2", "I swallowed a bug." },
1566+
{ "quote3", "You can't stop the signal, Mal." }
15721567
};
15731568

15741569
if (dbContext == null || dbContext.Values == null)
@@ -1674,8 +1669,8 @@ An `AddEFConfiguration` extension method permits adding the configuration source
16741669
public static class EntityFrameworkExtensions
16751670
{
16761671
public static IConfigurationBuilder AddEFConfiguration(
1677-
this IConfigurationBuilder builder,
1678-
Action<DbContextOptionsBuilder> optionsAction)
1672+
this IConfigurationBuilder builder,
1673+
Action<DbContextOptionsBuilder> optionsAction)
16791674
{
16801675
return builder.Add(new EFConfigurationSource(optionsAction));
16811676
}

aspnetcore/fundamentals/logging/index.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Learn how to use the ASP.NET Core logging framework provided by the
66
monikerRange: '>= aspnetcore-3.1'
77
ms.author: tdykstra
88
ms.custom: mvc
9-
ms.date: 01/15/2026
9+
ms.date: 01/23/2026
1010
uid: fundamentals/logging/index
1111
---
1212
# Logging in .NET and ASP.NET Core
@@ -541,18 +541,14 @@ The following `Counter` component logs from the `IncrementByOne` method with the
541541
private void IncrementByOne()
542542
{
543543
var logger = Logger.CreateLogger($"{typeof(Counter)}.IncrementByOne");
544-
545544
Logger.LogInformation("Someone incremented the counter!");
546-
547545
currentCount++;
548546
}
549547

550548
private void IncrementByTen()
551549
{
552550
var logger = Logger.CreateLogger($"{typeof(Counter)}.IncrementByTen");
553-
554551
Logger.LogInformation("Someone incremented the counter!");
555-
556552
currentCount += 10;
557553
}
558554
}
@@ -819,7 +815,7 @@ public async Task<TodoItem> GetTodoItem(long id)
819815

820816
using (Logger.BeginScope(new List<KeyValuePair<string, object>>
821817
{
822-
new KeyValuePair<string, object>("TransactionId", transactionId),
818+
new("TransactionId", transactionId),
823819
}))
824820
{
825821
Logger.LogInformation(LogEvent.GetItem, "Getting item {Id}", id);

aspnetcore/release-notes/aspnetcore-10/includes/blazor.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Files are placed into the import map:
209209

210210
When resolving the import for JavaScript interop, the import map is used by the browser resolve fingerprinted files.
211211

212-
## Preloaded Blazor framework static assets
212+
### Preloaded Blazor framework static assets
213213

214214
In Blazor Web Apps, framework static assets are automatically preloaded using [`Link` headers](https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Link), which allows the browser to preload resources before the initial page is fetched and rendered.
215215

@@ -229,6 +229,8 @@ In standalone Blazor WebAssembly apps, framework assets are scheduled for high p
229229
<link rel="preload" id="webassembly" />
230230
```
231231

232+
For more information, see <xref:blazor/fundamentals/static-files?view=aspnetcore-10.0#preloaded-blazor-framework-static-assets>.
233+
232234
### Set the environment in standalone Blazor WebAssembly apps
233235

234236
The `Properties/launchSettings.json` file is no longer used to control the environment in standalone Blazor WebAssembly apps.
@@ -407,12 +409,6 @@ New performance profiling and diagnostic counters are available for Blazor WebAs
407409
* <xref:blazor/performance/webassembly-browser-developer-tools?view=aspnetcore-10.0>
408410
* <xref:blazor/performance/webassembly-event-pipe?view=aspnetcore-10.0>
409411

410-
### Preloaded Blazor framework static assets
411-
412-
In Blazor Web Apps, framework static assets are automatically preloaded using [`Link` headers](https://developer.mozilla.org/docs/Web/HTTP/Reference/Headers/Link), which allows the browser to preload resources before the initial page is fetched and rendered. In standalone Blazor WebAssembly apps, framework assets are scheduled for high priority downloading and caching early in browser `index.html` page processing.
413-
414-
For more information, see <xref:blazor/fundamentals/static-files?view=aspnetcore-10.0#preloaded-blazor-framework-static-assets>.
415-
416412
### Opt-in to avoiding a `NavigationException` during static server-side rendering with `NavigationManager.NavigateTo`
417413

418414
Calling <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A?displayProperty=nameWithType> during static server-side rendering (static SSR) throws a <xref:Microsoft.AspNetCore.Components.NavigationException>, interrupting execution before being converted to a redirection response. This can cause confusion during debugging and is inconsistent with interactive rendering behavior, where code after <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A> continues to execute normally.

0 commit comments

Comments
 (0)