Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Indirect assembly dependency issue

Indirect assembly dependency issue

Scheduled Pinned Locked Moved Managed C++/CLI
c++questioncsharphelp
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 10167731
    wrote on last edited by
    #1

    I have a native dll with some code that I want to leverage from managed C# applications. So I wrote a C++/CLI class library to implement an wrapper assembly. This works well but it creates a maintenance issue. In the C# client project, I added a reference to my wrapper assembly and whenever I build the client project, the assembly dll gets copied to the build target folder. However the dependent native dll does not get copied. So my question is, how do I include the native dll in the wrapper assembly dependency so that they are both copied when the client project is built.

    P 1 Reply Last reply
    0
    • M Member 10167731

      I have a native dll with some code that I want to leverage from managed C# applications. So I wrote a C++/CLI class library to implement an wrapper assembly. This works well but it creates a maintenance issue. In the C# client project, I added a reference to my wrapper assembly and whenever I build the client project, the assembly dll gets copied to the build target folder. However the dependent native dll does not get copied. So my question is, how do I include the native dll in the wrapper assembly dependency so that they are both copied when the client project is built.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      AFAIK, you don't. What you could do is have a post-build step which copies the files over.

      Chill _Maxxx_
      CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

      J 1 Reply Last reply
      0
      • P Pete OHanlon

        AFAIK, you don't. What you could do is have a post-build step which copies the files over.

        Chill _Maxxx_
        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

        J Offline
        J Offline
        John Schroedl
        wrote on last edited by
        #3

        I'll second this. We have a post-build step copy the DLLs too. John

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups