diff --git a/docs/core/compatibility/6.0.md b/docs/core/compatibility/6.0.md index 8b148d78fc94d..0b9fa6c19f0fb 100644 --- a/docs/core/compatibility/6.0.md +++ b/docs/core/compatibility/6.0.md @@ -134,6 +134,7 @@ If you're migrating an app to .NET 6, the breaking changes listed here might aff | [MSBuild no longer supports calling GetType()](sdk/6.0/calling-gettype-property-functions.md) | | | RC 1 | | [OutputType not automatically set to WinExe](sdk/6.0/outputtype-not-set-automatically.md) | ✔️ | ❌ | RC 1 | | [Publish ReadyToRun with --no-restore requires changes](sdk/6.0/publish-readytorun-requires-restore-change.md) | ✔️ | ❌ | 6.0.100 | +| [runtimeconfig.dev.json file not generated](sdk/6.0/runtimeconfigdev-file.md) | ❌ | ✔️ | 6.0.100 | | [RuntimeIdentifier warning if self-contained is unspecified](sdk/6.0/runtimeidentifier-self-contained.md) | ✔️ | ❌ | RC 1 | | [Version requirements for .NET 6 SDK](sdk/6.0/vs-msbuild-version.md) | ✔️ | ✔️ | 6.0.300 | | [Write reference assemblies to IntermediateOutputPath](sdk/6.0/write-reference-assemblies-to-obj.md) | ❌ | ✔️ | 6.0.200 | diff --git a/docs/core/compatibility/sdk/6.0/runtimeconfigdev-file.md b/docs/core/compatibility/sdk/6.0/runtimeconfigdev-file.md new file mode 100644 index 0000000000000..bd6ef93b01800 --- /dev/null +++ b/docs/core/compatibility/sdk/6.0/runtimeconfigdev-file.md @@ -0,0 +1,36 @@ +--- +title: "Breaking change: runtimeconfig.dev.json file not generated" +description: Learn about the breaking change in the .NET 6 SDK where the runtimeconfig.dev.json file is no longer generated by default. +ms.date: 05/04/2022 +--- +# runtimeconfig.dev.json file not generated + +The .NET SDK no longer generates the *runtimeconfig.dev.json* file by default. This file was not used in most scenarios, and finding and loading the file added small amounts of performance overhead. + +## Previous behavior + +An *\[Appname].runtimesettings.dev.json* file was automatically generated at compile time. + +## New behavior + +The *\[Appname].runtimesettings.dev.json* file is no longer generated by default. + +## Version introduced + +.NET SDK 6.0.100 + +## Change category + +This change may affect [*binary compatibility*](../../categories.md#binary-compatibility). + +## Reason for change + +Not generating the file provides a small but measurable performance improvement. + +## Recommended action + +This change should not affect most customers. However, if you still require this file, add `true` to your project. For more information, see [GenerateRuntimeConfigDevFile](../../../project-sdk/msbuild-props.md#generateruntimeconfigdevfile). + +## Affected APIs + +N/A diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 22fae38cca862..d47aecf4d2088 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -239,6 +239,8 @@ items: href: sdk/6.0/outputtype-not-set-automatically.md - name: Publish ReadyToRun with --no-restore requires changes href: sdk/6.0/publish-readytorun-requires-restore-change.md + - name: runtimeconfig.dev.json file not generated + href: sdk/6.0/runtimeconfigdev-file.md - name: RuntimeIdentifier warning if self-contained is unspecified href: sdk/6.0/runtimeidentifier-self-contained.md - name: Version requirements for .NET 6 SDK @@ -985,6 +987,8 @@ items: href: sdk/6.0/outputtype-not-set-automatically.md - name: Publish ReadyToRun with --no-restore requires changes href: sdk/6.0/publish-readytorun-requires-restore-change.md + - name: runtimeconfig.dev.json file not generated + href: sdk/6.0/runtimeconfigdev-file.md - name: RuntimeIdentifier warning if self-contained is unspecified href: sdk/6.0/runtimeidentifier-self-contained.md - name: Version requirements for .NET 6 SDK diff --git a/docs/core/project-sdk/msbuild-props.md b/docs/core/project-sdk/msbuild-props.md index 2c45af4928e6d..8b728bf967011 100644 --- a/docs/core/project-sdk/msbuild-props.md +++ b/docs/core/project-sdk/msbuild-props.md @@ -148,6 +148,7 @@ The following MSBuild properties are documented in this section: - [CopyLocalLockFileAssemblies](#copylocallockfileassemblies) - [EnablePackageValidation](#enablepackagevalidation) - [ErrorOnDuplicatePublishOutputFiles](#erroronduplicatepublishoutputfiles) +- [GenerateRuntimeConfigDevFile](#generateruntimeconfigdevfile) - [GenerateRuntimeConfigurationFiles](#generateruntimeconfigurationfiles) - [IsPublishable](#ispublishable) - [PreserveCompilationContext](#preservecompilationcontext) @@ -221,6 +222,16 @@ The `EnablePackageValidation` property enables a series of validations on the pa This property was introduced in .NET 6. +### GenerateRuntimeConfigDevFile + +Starting with the .NET 6 SDK, the *\[Appname].runtimesettings.dev.json* file is [no longer generated by default](../compatibility/sdk/6.0/runtimeconfigdev-file.md) at compile time. If you still want this file to be generated, set the `GenerateRuntimeConfigDevFile` property to `true`. + +```xml + + true + +``` + ### GenerateRuntimeConfigurationFiles The `GenerateRuntimeConfigurationFiles` property controls whether runtime configuration options are copied from the *runtimeconfig.template.json* file to the *[appname].runtimeconfig.json* file. For apps that require a *runtimeconfig.json* file, that is, those whose `OutputType` is `Exe`, this property defaults to `true`.