Tests targeting NetStandard due to readonly
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
The default for IL baselines includes `readonly` when emitting a method signature. This means APIs which have become `readonly` will display differently depending on what references the code was compiled against. For example `Nullable.GetValueOrDefault`. In modern .NET Core TFMs it will appear as `readonly` while in others it will not. This makes it hard to have tests that run on both .NET Framework and .NET Core as the IL representations change.
These are tests that target `netstandard2.0` because of this issue.
Types:
- [ ] NullConditionalAssignmentTests
- [ ] UserDefinedConversionTests
Methods:
- [ ] CollectionExpressionTests.IOperation_01
- [ ] TargetTypedSwitch_AnyTypedSwitchWithoutTargetType
Contributor guide
Research direction
Locate the listed NullConditionalAssignmentTests, UserDefinedConversionTests, CollectionExpressionTests.IOperation_01, and TargetTypedSwitch_AnyTypedSwitchWithoutTargetType tests, then inspect why each targets netstandard2.0. Compare their IL baselines across target frameworks; completion should establish the appropriate target and consistent readonly representation for every listed test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers, testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100