语言

Menu
Sites
Language
Using external libraries (FSharp.Core.dll)

Hi, I've been experimenting with writing a wearable app using Tizen.NUI in F#. I managed to get a static app that just shows some text to run on the emulator, but if I try to reference anything defined in the FSharp.Core library, it'll crash while trying to load the app.

I don't see FSharp.Core.dll in the tpkroot directory created when I build the app. I tried to add a PackageReference to FSharp.Core to the .fsproj file and putting the dll in /lib (which is copied to the tpkroot when compiling), but it still crashes.

 

Am I right in thinking this is happening because the dll just isn't copied in the app bundle? Is there any way to get this to work?

Project here: https://github.com/steinuil/twet

响应

4 回复
Tizen .NET

Hi, thank you for reaching out!I couldn't find any particular problems when I just cloned and confirmed the projects you shared (https://github.com/steinuil/twet).I found the FSharp.Core.dll in tpkroot/bin directory after building. And when I ran the app, it worked fine without any crash.

Can you share more details about your development environment for reproduction?

Thank you!

Steinuil

I'm developing the project with VS Code and I'm using the "dotnet build" command to build the project.

I tried building through Visual Studio (right click on the project > Build) instead and indeed FSharp.Core.dll is included in the build directory, and when I use functions from FSharp.Core everything works fine.

Judging from the build log it looks like the TizenComputeTpkPackageFiles target does not copy the dll when using "dotnet build". I've included the logs here: gist.github.com/steinuil/3a93a382c719e0488f4deaab1edc36fb

Thanks!

 

Sangwook Kim

I only have a problem with 'dotnet clean' command but not with 'dotnet build'. Unfortunately the issue is not reproducible on my machines either. I've tried with both .NET CLI 2.1.700 on Ubuntu 18.04 and 2.1.500 on Windows.

Here is my log: https://gist.github.com/swift-kim/0fae6c2e3fcab33075df82aed6ab728d.

If it looks like a packaging issue with Tizen build targets, please report in https://github.com/Samsung/build-task-tizen/issues. Also please note that the correct TFM identifier is tizen40 (not tizen4).

Steinuil

I figured it out; I was using the .NET Core SDK preview version (v3.0.0-preview5), switching to 2.2.102 fixed the issue. I'm also not seeing problems with "dotnet clean" in either version.

I reported the issue on the project you linked.

Thank you!