How to enable C# 9.0-preview

后端 未结 3 469
太阳男子
太阳男子 2020-12-18 18:14

I have downloaded and installed v5.0.0-preview.5. My project is targeting net5.0 but C# 9.0 is not working. How can I enable C#

3条回答
  •  遥遥无期
    2020-12-18 19:12

    Firstly Download .NET 5 and then install Visual Studio Preview Edition. You will now have access to the latest features of C# 9. Also make sure that you project file includes the following.

     
    Exe
    net5.0
    preview
    

提交回复
热议问题