Skip to content

[Bug]: Extension CodeDom has incorrect description for C# versions #6659

@iJungleboy

Description

@iJungleboy

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

DNN 10 has CodeDom 4.1. The description indicates that it supports C# 7.3.

Image

This is incorrect. Already the previous CodeDom 3.6 supported C# 8, and according to my tests, the latest CodeDom supports C# 10!.

I believe this description should be updated to match what it actually provides.

Steps to reproduce?

  1. go to extensions to see existing info

Try to create a script like this (a bit messy) using C# 10 features in the RazorHost Module:

@{
 // target typed new, c# 9
 DateTime TestDate2 = new();
}

<br>
Test2: @TestDate2
<br>


@functions {
  class TestClass {
    public string Abc {get;set;} = "abc";
  }
  record TestRec {
    public string Def { get; set; } = "testRec";
    public string Xyz { get; set; /* init; */ } = "init-only";
  }

  // Record Struct - c# 10
  record struct RecStruct {
  }
}
@{
  TestClass x = new();
  var y = new TestRec();

  // with-statement, c# 9
  var z = y with { Def = "changed" };

  // Lambda return type (object) C# 10
  var choose = object (bool b) => b ? 1 : "two"; 

  // c# 11 doesn't work
  //  var maybeArray = [1, 2, 3];
}

TestCLass: @x.Abc
<br>
TestRecord: @y.Def / @y.Xyz
<br>
z after with: @z.Def
<br>
Choose: @choose(true)
<br>
@if (x is not null) {
<code>x is not null</code>
}

Current Behavior

No response

Expected Behavior

No response

Relevant log output

Anything else?

No response

Affected Versions

10.0.1 (latest v10 release)

What browsers are you seeing the problem on?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions