locked
Deploy a windows store app that depends on a external non clr dll RRS feed

  • Question

  • Hi,

    I've created a windows 8 app that will run on surface pro tables --NOT RT based- . The app requires the use of a .net assembly to run.

    The .net assembly is dependent on a c dll.

    The assembly has all the p/invoke code required to communicate with the dll.

    Reading docs online I believe I understand how to add the c++ redistributable requirement to the project from the link below

    http://blogs.msdn.com/b/vcblog/archive/2012/09/28/10354327.aspx

    My question is: What is the recommended way of ensuring the dll is distributed with the package?

    What I have done to make my app work (on my dev system) is to add the dll to my project by selecting Add-Existing item adding the dll and setting Copy to Output Directory to Copy always and Build Action to content.

    Wednesday, September 18, 2013 7:45 PM

Answers

  • It sounds like you are doing it correctly. You can look in the deployment directory or examine the created package (rename to zip and open it up) to confirm that the DLL was copied over correctly.

    If it didn't make it into the deployment package then you should get an error when trying to use the library in testing as well.

    --Rob

    • Marked as answer by jolson111 Wednesday, September 18, 2013 8:40 PM
    Wednesday, September 18, 2013 7:58 PM

All replies

  • It sounds like you are doing it correctly. You can look in the deployment directory or examine the created package (rename to zip and open it up) to confirm that the DLL was copied over correctly.

    If it didn't make it into the deployment package then you should get an error when trying to use the library in testing as well.

    --Rob

    • Marked as answer by jolson111 Wednesday, September 18, 2013 8:40 PM
    Wednesday, September 18, 2013 7:58 PM
  • just be sure the dll your using isnt making forbidden system calls

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Wednesday, September 18, 2013 8:32 PM
  • I don't believe it is, my understanding is Winrt is the platform that has the restrictions on system calls. We have been doing all of our development on windows surface pro tablets. Which is our current target platform.
    • Edited by jolson111 Wednesday, September 18, 2013 8:43 PM
    Wednesday, September 18, 2013 8:42 PM