Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-1085

`realm-wrappers.dll` cannot be found in a single file application

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      What happened?

      When publishing as a single file in net6+ Realm cannot find the realm-wrappers.dll file. I can see other similar issues but nobody specifically talking about PublishSingleFile.

      The workaround is to copy realm-wrappers.dll around with the exe but now it's not a single file. It's two files, which is double the number of files expected.

      Repro steps

      1. Add <PublishSingleFile>true</PublishSingleFile> to your .csproj
      2. Now the realm-wrappers.dll cannot be found

      Version

      net8.0-windows

      What Atlas Services are you using?

      Local Database only

      What type of application is this?

      Console/Server

      Client OS and version

      Windows 10 Pro 22H2

      Code snippets

      <PublishSingleFile>true</PublishSingleFile>

      Stacktrace of the exception/crash you're getting

      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
      The type initializer for 'Realms.SharedRealmHandle' threw an exception.
      

      Relevant log output

      No response

            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: