How to automate DLL deployment for P/Invoke?

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?
 
A

Andrea D'Onofrio

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
 
H

Hugh Williams

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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top