From 4757744b79b978cc775e7253f024d5ffeb261eb1 Mon Sep 17 00:00:00 2001 From: "Cynthia Z E MacLeod (C3D)" Date: Wed, 12 Apr 2023 15:30:34 +0100 Subject: [PATCH 1/2] Select MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version based on TargetFrameworkVersion --- .../Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.props | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MSBuild.SDK.SystemWeb.CommonFiles/Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.props b/src/MSBuild.SDK.SystemWeb.CommonFiles/Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.props index a6a540f..3ed9eea 100644 --- a/src/MSBuild.SDK.SystemWeb.CommonFiles/Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.props +++ b/src/MSBuild.SDK.SystemWeb.CommonFiles/Sdk/MSBuild.SDK.SystemWeb.Common.DefaultPackages.props @@ -1,6 +1,10 @@  4.5.0 - 3.6.0 + + + 3.6.0 + 3.11.0 + 4.1.0 \ No newline at end of file From 997b15f936e3db38055c37c7fd6117cef47514b2 Mon Sep 17 00:00:00 2001 From: "Cynthia Z E MacLeod (C3D)" Date: Mon, 29 May 2023 19:50:38 +0100 Subject: [PATCH 2/2] Update docs to show common package versions now depend on target framework and updated package versions. --- docs/RazorLibrary.md | 10 ++++++---- docs/SDK.md | 13 ++++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/RazorLibrary.md b/docs/RazorLibrary.md index 50df500..6485ca1 100644 --- a/docs/RazorLibrary.md +++ b/docs/RazorLibrary.md @@ -66,10 +66,12 @@ For more information see ### Common Packages -| Package | Default Version | Property | -| ------- | --------------- | -------- | -| `Microsoft.Net.Compilers.Toolset` | 4.5.0 | `MicrosoftNetCompilersToolset_Version` | -| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | 3.6.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | +| Package | Target Framework | Default Version | Property | +| ------- | ---------------- | --------------- | -------- | +| `Microsoft.Net.Compilers.Toolset` | Any | 4.5.0 | `MicrosoftNetCompilersToolset_Version` | +| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | <4.6.2 | 3.6.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | +| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | >=4.6.2 and < 4.7.2 | 3.11.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | +| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | >=4.7.2 | 4.1.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | ### Specific Packages diff --git a/docs/SDK.md b/docs/SDK.md index 81512d3..26d7b58 100644 --- a/docs/SDK.md +++ b/docs/SDK.md @@ -37,7 +37,7 @@ You can also use the [templates](Templates.md) to easily create new projects. | -------- | ------------- | ----------- | | `ExcludeSDKDefaultPackages` | false | Do not include the default packages `Microsoft.Net.Compilers.Toolset` and `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | | `ApplySDKDefaultPackageVersions` | true* | Apply default version numbers to packages unless using a Central Package Management system | -| `GeneratedBindingRedirectsAction` | None | Set the desired default behavior of what to do with SuggestedBindingRedirects if not yet set.
See [automatically generated binding redirects](Binding_Redirects/Autogenerating-Binding-Redirects.md)
| +| `GeneratedBindingRedirectsAction` | None | Set the desired default behavior of what to do with SuggestedBindingRedirects if not yet set.
See [automatically generated binding redirects](Binding_Redirects/Autogenerating-Binding-Redirects.md)
| *Version numbers are not applied if you are using `Microsoft.Build.CentralPackageVersions` version 2.1.1 or higher. Remember to include the packages in your central package versions file. @@ -52,6 +52,7 @@ You can also use the [templates](Templates.md) to easily create new projects. ** You will have to adjust your web.config to change the `system.codedom/compilers/compiler` `compilerOptions` attribute to set the langversion - it won't automatically use the `LangVersion` property from your project file. ### Deprecated Properties + | Property | Default value | Description | | -------- | ------------- | ----------- | | `ExcludeASPNetCompilers` | false | Use `ExcludeSDKDefaultPackages` instead | @@ -61,7 +62,9 @@ You can also use the [templates](Templates.md) to easily create new projects. ### Common Packages -| Package | Default Version | Property | -| ------- | --------------- | -------- | -| `Microsoft.Net.Compilers.Toolset` | 4.5.0 | `MicrosoftNetCompilersToolset_Version` | -| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | 3.6.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | +| Package | Target Framework | Default Version | Property | +| ------- | ---------------- | --------------- | -------- | +| `Microsoft.Net.Compilers.Toolset` | Any | 4.5.0 | `MicrosoftNetCompilersToolset_Version` | +| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | <4.6.2 | 3.6.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | +| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | >=4.6.2 and < 4.7.2 | 3.11.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` | +| `Microsoft.CodeDom.Providers.DotNetCompilerPlatform` | >=4.7.2 | 4.1.0 | `MicrosoftCodeDomProvidersDotNetCompilerPlatform_Version` |