0

I have a SDK written in C# targeting Win10 UWP apps. It uses SQLite and works perfectly on C# client apps.

But can a C++/javascript app use my SDK with the SQLite dependency? A winmd (windows runtime component build) would be required in case the SDK has to be UWP compatible since a UWP app can be in C#/C++/javascript/Visual basic.

I have posted this in msdn forums and they say i would need a windows runtime component for all the 3rd party dependencies for it to work. Have already tried wrapper projects and wrapper winmd build, it does not work. I am unable to find any winmd build for SQLite library.

Please advise on what can be done here. Any help is really appreciated.

4

2 回答 2

0

But can a C++/javascript app use my SDK with the SQLite dependency?

Yes, as in msdn forums said, you will need to wrapper in WinRT component universal apps.

Have already tried wrapper projects and wrapper winmd build, it does not work.

I don't know what blocks you, but you can refer to Writing a SQLite wrapper component for universal Windows apps, there are detailed steps you will need to follow, and samples you may have a look.

于 2016-08-24T09:42:42.717 回答
0

I tried various approaches to make this project work and found some success in the following: Following is the project structure I made along with dependencies :

Client Application (in C++):

  1. Wrapper winmd library.

Wrapper winmd library (in C#): (I generate a winmd component from this project)

  1. My SDK project

My SDK project (in C#):

  1. SQLite Net.

  2. SQLite Net Async.

  3. Newtonsoft JSON.

When I build the client application, I get the wrapperlibrary.winmd file but I dont get the corresponding dlls from the 3rd party dependencies in the output directory (SQLite and Newtonsoft). So i manually copied the required dlls to the output directory of the C++ application. Now it seems to work correctly, I can verify correct usage of the 3rd party libraries and my C# code. Presently I am just trying to make the setup work as a poc and worry about the packaging later. The issue I now face is that my SDK also has some UI elements, so essentially compiled .xbf files for the "XAML" I have.

I have asked this question in another thread to not go off main topic here.

于 2016-08-31T11:20:11.930 回答