0

I'd wrote a DLL in .net. I use it in UNO Platform for UWP. Now i'd like tu use some function of this DLL in WASM project. Is it Possible ? In UWP i connect the DLL in reference folder. In WASM how can i done ? Thanks

Daniele P.
  • 83
  • 10

1 Answers1

0

I'm assuming your .NET project file has references to UNO WASM bootstrap packages. If not add them like this.

  <ItemGroup>
    <PackageReference Include="Uno.Wasm.Bootstrap" Version="2.1.0" />
    <PackageReference Include="Uno.Wasm.Bootstrap.DevServer" Version="2.1.0" PrivateAssets="all" />
 </ItemGroup>

Once this is done and your .NET project is able to build and run as WASM. There should a bunch of files generated by UNO Bootstrap WASM in the /bin folder of .NET project. Some of those include

  1. uno_bootstrap.js
  2. dotnet.js
  3. dotnet.wasm

Look at JS code in first two, uno-bootstrap.js is the entry point, which will call dotnet.js which will have JS bindings into WASM. This will also list any DLLs that are linked into WASM. YOu can add your DLL here.

Akash Mankar
  • 451
  • 6
  • 15