Skip to content
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

Support running on preview versions of .NET #9

Merged
merged 1 commit into from
Jun 4, 2021
Merged

Conversation

waf
Copy link
Owner

@waf waf commented Jun 4, 2021

When we're determining the shared framework implementation paths, we parse the version number to a System.Diagnostics.CodeAnalysis.Version so we can choose the latest point release (so e.g. 5.0.10 comes after 5.0.9, which wouldn't be the case for normal string sorting). However, for preview versions of .NET, the version string has a trailing identifier, e.g. 6.0.0-preview.4.21253.7, which causes System.Diagnostics.CodeAnalysis.Version to throw.

Note, unit tests were failing when targeting net6.0; this fixes them all.

fixes #8

When we're determining the shared framework implementation paths, we parse the version number to a `System.Diagnostics.CodeAnalysis.Version` so we can choose the latest point release (so e.g. 5.0.10 comes after 5.0.9, which wouldn't be the case for normal string sorting). However, for preview versions of .NET, the version string has a trailing identifier, e.g. `6.0.0-preview.4.21253.7`, which causes `System.Diagnostics.CodeAnalysis.Version` to throw.

Note, unit tests were failing when targeting `net6.0`; this fixes them all.

fixes #8
@codecov-commenter
Copy link

Codecov Report

Merging #9 (17c11e3) into main (0942acd) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main      #9     +/-   ##
=======================================
+ Coverage   71.3%   71.4%   +0.1%     
=======================================
  Files         20      20             
  Lines       1078    1082      +4     
  Branches      91      91             
=======================================
+ Hits         769     773      +4     
  Misses       277     277             
  Partials      32      32             
Impacted Files Coverage Δ
...rpRepl.Services/Roslyn/ReferenceAssemblyService.cs 92.7% <100.0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0942acd...17c11e3. Read the comment docs.

@waf waf merged commit 8ac5d47 into main Jun 4, 2021
@waf waf deleted the support-net6-preview branch June 4, 2021 15:07
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.

CSharpRepl doesn't work on .NET 6 Preview ("Version string portion was too short or too long")
2 participants