언어 설정

Menu
Sites
Language
Forbidden Assembly

Hi,

This is my first Tizen.NET application with Visual Studio .NET 2019. It works great on the emulator.

I am now trying to run it on my TV. I set up everything: the TV is connected, the certificate is installed on the TV, etc.

However, when I launch the application from Visual Studio I get the following message on my TV :

"System.ServiceModel.dll refers to a forbidden assembly directly: System.Private.ServiceModel"

Any idea please ?

Best regards,

Nabil

Responses

12 댓글
Sangwook Kim

Could you elaborate more? Which nuget packages or DLLs do you reference in your project?

Hyungju Lee

Something like this? (System.ServiceModel.Http)

Hyungju Lee

I googled "refers to a forbidden assembly directly" and this may be helpful.

https://github.com/SamsungDForum/JuvoPlayer/issues/6#issuecomment-563413169

 

 

Nabil Madrane

Thank you both for your answer.

The project is using a library called DLToolkit.Forms.Controls.FlowListView which actually references System.ServiceModel.dll and System.ServiceModel.Web.dll. Why is this forbidden?

I did a second experiment: I decided to start from a fresh, brand new, project. It works great on TV. But as soon as I add a reference to Tizen.TV.UIControls, I get the following error :

“Tizen.TV.UIControls.Forms.dll refers a forbidden assembly directly : libevas.so.1”

So, even with this single dependency, there is still a problem.

Tizen .NET

Hi
Could you try to use 'TVUI 1.1.0 preview1' version?
NuGet : https://www.nuget.org/packages/Tizen.TV.UIControls/1.1.0-pre1
Release Node : https://github.com/Samsung/Tizen.TV.UIControls/releases/tag/beta-1.1.0-pre1
(Limitation: OverlayMediaView is not supported)
Thanks

 

Nabil Madrane

Thank you so much, it works with TVUI 1.1.0 preview1 :)

Nabil Madrane

But now I have the same error with sqlite :(

"SQLitePCLRaw.provider.sqlite3.dll refers a forbidden assembly directly - sqlite3"

I have referenced the following nuget packages :

  • sqlite-net-base
  • SQLitePCLRaw.provider.sqlite3.netstandard11

Any idea please ?

 

Nabil Madrane

Anybody with an idea please ?

I am stuck with that problem and I can't believe that there is no clear/detailed tutorial on the net that explains how to integrate SQLite with Tizen.net

 

Tizen .NET

Hi, I apologize for the inconvenience in developing Tizen .NET app.
It seems that the error occurs while using SQLite, a 3rd party library.
As far as I know, Samsung Smart TV does not allow the use of P/Invoke(DllImport) directly in the app or 3rd party library unlike Tizen Platform.
Regarding this, I'm double-checking it with TV product team and ask out the solution.
I will share it as soon as I get the the answer.

Nabil Madrane

Hi,

Thanks a lot for your answer.

If you look at https://swoogo.s3.amazonaws.com/uploads/46862-592707a97d1b9.pdf you will find at slide #29 a screenshot showing that sqlite is supposed to work. However, as soon as I reference de packages listed in this slide I get the "forbidden assembly" error.

Anyway, I will wait for your feedback. Thanks again.

 

Ali Demir

Hi,

do you have an idea or solution?
If I understood correctly, samsung smart TVs do not accept the import of foreign dlls for security reasons?
Should we then use the Microsoft.Data.SQlite libraries?
Or there are a solution for SQLitePCLRaw (ex: become partner, sign it?)

Thank you.

Tizen .NET

https://github.com/Samsung/Tizen.NET/issues/72
Due to the security policy of Samsung TV products, loading the library provided by TV product using DllImport is not supported.
(In this case, SQLitePCLRaw.provider.sqlite3 dll is trying to load sqlite3 library provided by TV product through DllImport and it's not allowed on Samsung TV products.)
You need to find out pure database solution or you can use Preference API if the data type you want to save is int/string/bool/double.
Sorry for the inconvenience.