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. Advertising

  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

    "Hugh Williams" <> wrote in message
    news:...
    > 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?
    >
    >
     
    Andrea D'Onofrio, Nov 24, 2003
    #2
    1. Advertising

  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

    "Andrea D'Onofrio" <> wrote in message
    news:...
    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" <> wrote in message
    news:...
    > 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
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,996
  2. Lloyd Dupont

    how to invoke a method in a DLL

    Lloyd Dupont, Jul 13, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    393
    Natty Gur
    Jul 13, 2003
  3. Benny Ng
    Replies:
    0
    Views:
    4,479
    Benny Ng
    Oct 3, 2005
  4. Standist
    Replies:
    0
    Views:
    1,408
    Standist
    Feb 8, 2006
  5. H. Simpson
    Replies:
    4
    Views:
    342
    H. Simpson
    Aug 3, 2004
Loading...

Share This Page