How to automate DLL deployment for P/Invoke?

  • Thread starter Thread starter Hugh Williams
  • Start date Start date
H

Hugh Williams

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?
 
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
 
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
 
Back
Top