What happened?

      Since upgrading to version 11.1.0 I get the following compiler error:

      error CS0118: 'Realm' is a namespace but is used like a type
      

      When trying to use the Realm type like this:

      Unable to find source-code formatter for language: cs. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      using Realms;
      
      public class Example
      {
          private Realm realm;
      }
      

      Fully qualifying the type does resolve the error:

      Unable to find source-code formatter for language: cs. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      public class Example
      {
          private Realms.Realm realm;
      }
      

      I think this might have something to do with the addition of the Realm namespace in #3323

      Repro steps

      1. Create a new Unity project and add the realm package
      2. Create the following class:
      Unable to find source-code formatter for language: cs. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      using Realms;
      
      public class Example
      {
          private Realm realm;
      }
      

      Version

      11.1.0

      What Atlas Services are you using?

      Local Database only

      What type of application is this?

      Unity

      Client OS and version

      Windows 11

      Code snippets

      Unable to find source-code formatter for language: cs. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      using Realms;
      
      public class Example
      {
          private Realm realm;
      }
      

      Stacktrace of the exception/crash you're getting

      No response

      Relevant log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      Assets\Example.cs(5,13): error CS0118: 'Realm' is a namespace but is used like a type
      

            Assignee:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: