LINQPad's preview version of roslyn does not support nullable reference types

edited December 2018
I have posted a discussion here:
http://forum.linqpad.net/discussion/1723/add-updated-experimental-roslyn-assemblies-to-support-c-8-0 to upgrade to latest roslyn.

Looks like it's not a latest version, it does support Indexes and Ranges, but the nullable reference types seem not working anymore. Please have some check and better upgrade to latest 2.10(Currently preview is 2.9.0.0):
https://github.com/dotnet/roslyn/releases
https://github.com/dotnet/roslyn/releases/tag/version-2.10.0

Comments

  • edited December 2018
    Hmm, do we have any update for this? Or can I download previous version of LINQPad(say 5.31?)
  • I've reverted the preview assemblies to the previous state, so nullable reference types will work again.

    To support 2.10 will require a new LINQPad build. I'll try and upload something in the next day or two.
  • I've just downloaded the 2.10 build. Correct me if I'm wrong, but it looks like it supports nullable types, but not other C# 8 experimental features such as ranges and indexes. (I've not tried building directly from the source code - I'd like to avoid this if possible.)
  • edited December 2018
    Sounds a plan, thank you :)
    Looks like the current version of Visual Studio 2019 Preview 1.1 is using the roslyn 2.11 preview, it's a not released version.
  • Try the latest LINQPad beta. When you download the experimental Roslyn assemblies, it should now pick up Roslyn 2.11.
  • Thanks you, that's really a great news!
  • edited December 2018
    It works, and unbelievablely, compiler automatically generate Range.cs/Index.cs in assembly! (I created a nuget package here: https://www.nuget.org/packages/Sdcb.System.Range/)

    Is this generated by Roslyn or LINQPad?
  • It's generated by LINQPad. If those types are not present, it includes the source for them in the query.
  • This is strange, using the previous beta I was able to use the new switch expression , when using the preview roslyn assemblies but, since upgrading to the latest beta I can't.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!