-
Notifications
You must be signed in to change notification settings - Fork 89
Set default TFM for Traversal to SDK version #610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,12 @@ | |
<EnableDefaultItems>false</EnableDefaultItems> | ||
|
||
<!-- | ||
TargetFramework is required for restore and used to default to .NET Framework v4.5. However, Traversal projects don't specify a version so it needs to be defaulted here. | ||
TargetFramework is required for restore. If the user specifies a version, use that. Otherwise, use the | ||
NETCoreAppMaximumVersion so that the project acts as if it were part of the SDK. If for some reason that's also | ||
not set, fallback to the SDK's old default of .NET Framework v4.5. | ||
--> | ||
<TargetFramework Condition="'$(TargetFramework)' == ''">net45</TargetFramework> | ||
<TargetFramework Condition=" '$(TargetFramework)' == '' And '$(NETCoreAppMaximumVersion)' != ''">net$(NETCoreAppMaximumVersion)</TargetFramework> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about something like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be an improvement over Targeting old netstandard means we're still opt-ed out of modern defaults like defaulting to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another alternative would be to find a solution for the project templates. Then we could default to the current SDK version in the template. I also prefer that option a bit less since it means every Traversal would set the TFM which clutters things a bit, but it'd be less magical. |
||
<TargetFramework Condition=" '$(TargetFramework)' == ''">net45</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"inherit": true, | ||
"version": "4.1" | ||
"version": "5.0" | ||
} |
Uh oh!
There was an error while loading. Please reload this page.