How to automate DLL deployment for P/Invoke?

Discussion in 'ASP .Net' started by Hugh Williams, Nov 24, 2003.

  1. I have a Visual Studio solution that includes two projects:

    1) an unmanaged C++ project that produces a Win32 DLL
    2) a C# web service

    I want to have the build process for the web service copy the Win32 DLL to
    the web service's /bin directory so that some P/Invoke calls will work.
    Unfortunately, there are no pre- and post-build steps available in web
    service projects.

    Any suggestions?
     
    Hugh Williams, Nov 24, 2003
    #1
    1. Advertisements

  2. You could set the unmanaged project's output folder equals to the web
    service's Bin folder ... and you must build the solution (not only the web
    service project)

    HtH

    Andrea
     
    Andrea D'Onofrio, Nov 24, 2003
    #2
    1. Advertisements

  3. Thanks Andrea,

    I simplified things a bit for the purposes of the post - I'll elaborate a
    bit:

    The DLL is consumed by multiple web services, so resetting the DLL project's
    output directory is only a half-way solution.

    I suppose I could hack it by making a post-build step that copies the output
    to all the different web services, but ... yuck.

    Thanks again for the thought.

    HW

    You could set the unmanaged project's output folder equals to the web
    service's Bin folder ... and you must build the solution (not only the web
    service project)

    HtH

    Andrea
     
    Hugh Williams, Nov 24, 2003
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.