locked
Adding non referenced dll's so they are deployed to the AppX directory after running the simulator

    Question

  • Hi,

    My Windows store application is mainly driven by html5/javascript with a WINMD library. Some of the dll's required to run the WINMD library aren't referenced. How can these dll's be copied to the AppX directory when I run the application within visual studios.

    Thanks

    Martin.

    PS. I've tried the following but the AppX directory is cleared when I run the simulator and just the referenced files are deployed

      <Target Name="AfterBuild">
        <!-- Copy non-referenced assemblies -->
        <Copy SourceFiles="@(NonReferencedAssemblies)" DestinationFolder="$(TargetDir)\AppX" SkipUnchangedFiles="false" />
      </Target>

    Thursday, September 4, 2014 4:06 PM

Answers

  • I just reread your initial post and realized you're using an HTML app not a .Net app. I'll move this to the right forum for you.

    It's also not clear why you are using a winmd but not referencing it? That would act differently as well. Just referencing the winmd should pull in everything needed for a basic winmd. If you have something complicated (such as a native component) you may need to create an SDK as described at Creating a Software Development Kit

    Can you explain clearly the steps you're using and share a minimal project?


    Friday, September 5, 2014 12:44 AM
    Moderator

All replies

  • Add the files to the project, open the files' properties in the Solution Explorer window, and mark them as content to be included in the app package.

    Thursday, September 4, 2014 4:24 PM
    Moderator
  • If I add the dll as content, it is only copied to the debug directory not to the AppX directory
    Thursday, September 4, 2014 11:26 PM
  • That shouldn't happen. It sounds like they aren't being properly added. I just confirmed that adding a DLL to the project, setting its Build Action to Content (this was the default), and deploying the project did copy the DLL to the Appx. This is a C# Blank app (Windows) in Visual Studio 2013:

    Solution Explorer showing DLL with Build Action as Content

    Can you walk through your steps? Can you share a minimal project which demonstrates the problem on your OneDrive?

    Friday, September 5, 2014 12:41 AM
    Moderator
  • I just reread your initial post and realized you're using an HTML app not a .Net app. I'll move this to the right forum for you.

    It's also not clear why you are using a winmd but not referencing it? That would act differently as well. Just referencing the winmd should pull in everything needed for a basic winmd. If you have something complicated (such as a native component) you may need to create an SDK as described at Creating a Software Development Kit

    Can you explain clearly the steps you're using and share a minimal project?


    Friday, September 5, 2014 12:44 AM
    Moderator