Change default TargetFramework from net472 to netstandard2.1 for non-…#791
Change default TargetFramework from net472 to netstandard2.1 for non-…#791gauravyug wants to merge 2 commits into
Conversation
…NetCoreBuild projects
|
@gauravyug please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
| </PropertyGroup> | ||
|
|
||
|
|
||
| <!-- When user opts into .NET Framework for SQLCLR assemblies, override the TFV/TFM that was |
There was a problem hiding this comment.
How does the user "opt in" - and what if she chooses net48 ?
There was a problem hiding this comment.
Valid concern, thanks for catching this.
With this fix user opts in by setting in their .sqlproj.
Updated the implementation — instead of hardcoding net472, we now clear the stale TFV/TFM defaults whenever the user overrides TargetFramework, and let Microsoft.NET.Sdk's TargetFrameworkInference handle the resolution. This works for net472, net48, or any other valid TFM.
…NetCoreBuild projects
Description
Updates the default TargetFramework in Sdk.props from net472 / .NETFramework to netstandard2.1 / .NETStandard for projects where NetCoreBuild is false (Visual Studio / non-CLI builds). This makes netstandard2.1 the baseline, while still allowing users to opt into net472 for SQLCLR assembly scenarios.
In addition, go through the checklist below and check each item as you validate it is either handled or not applicable to this change.
Code Changes