Skip to content

Enable detection of .NET version without TargetFrameworkAttribute#3580

Merged
siegfriedpammer merged 2 commits into
icsharpcode:masterfrom
ds5678:detect-target-framework-id-net-5
Oct 5, 2025
Merged

Enable detection of .NET version without TargetFrameworkAttribute#3580
siegfriedpammer merged 2 commits into
icsharpcode:masterfrom
ds5678:detect-target-framework-id-net-5

Conversation

@ds5678

@ds5678 ds5678 commented Oct 5, 2025

Copy link
Copy Markdown
Contributor

Problem

Without TargetFrameworkAttribute, all .NET 5+ assemblies are currently assumed to be targeting .NET Core 3.1.

Solution

  • Any comments on the approach taken, its consistency with surrounding code, etc.
  • Which part of this PR is most in need of attention/improvement?
    • I have no unit test.
  • At least one test covering the code changed

@ds5678
ds5678 force-pushed the detect-target-framework-id-net-5 branch from b8db454 to 21e3056 Compare October 5, 2025 07:41
@siegfriedpammer
siegfriedpammer merged commit b50f4e1 into icsharpcode:master Oct 5, 2025
5 checks passed
@ds5678
ds5678 deleted the detect-target-framework-id-net-5 branch October 5, 2025 08:07
@CreateAndInject

Copy link
Copy Markdown
Contributor

@ds5678 @siegfriedpammer Why all .NET 5+ assemblies are currently assumed to be targeting .NET Core 3.1.?

@siegfriedpammer

siegfriedpammer commented Oct 5, 2025

Copy link
Copy Markdown
Member

@CreateAndInject what? the title of the PR describes a bug, which it already fixes.

@CreateAndInject

Copy link
Copy Markdown
Contributor

@CreateAndInject what? the title of the PR describes a bug, which it already fixes.

Sorry, I misunderstood just now.

@CreateAndInject

CreateAndInject commented Oct 5, 2025

Copy link
Copy Markdown
Contributor

@siegfriedpammer @ds5678 Why ignore System.Runtime whose version is lower than 4.2? Seems .NET Core 1.0/1.1 use System.Runtime 4.1.0.0

1.0/1.1 => 4.1
2.0 => 4.2.0
2.1/2.2/3.0 => 4.2.1
3.1 => 4.2.2

@ds5678

ds5678 commented Oct 5, 2025

Copy link
Copy Markdown
Contributor Author

I'll make a follow up pr

@ds5678

ds5678 commented Oct 5, 2025

Copy link
Copy Markdown
Contributor Author

Does Net Core 1.1 use 4.1.0 or 4.1.1?

@ds5678 ds5678 mentioned this pull request Oct 5, 2025
1 task
@CreateAndInject

Copy link
Copy Markdown
Contributor

Both .NET Core 1.0/1.1 use 4.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants