I’m creating a .NET DLL that acts as a wrapper using PInvoke on an unmanaged DLL. My question is, if I’m PInvoking an unmanaged DLL that references other DLLs when using click once, which DLLs do I need to include with the deployment of a project that uses that .NET Wrapper DLL?
Files involved:
- Project that uses click once deployment
- .NET DLL that wraps unmanaged DLL (call it X.DLL)
- X.DLL that is an unmanaged DLL
- Y.DLL that is an unmanaged DLL called by X.DLL
Do I have to include all of these files in the click once deployment? Just the .NET DLL? Explanations of why would be helpful as well 🙂
Yes, you have to specify all of them. Or at least make sure they’re all available on the target in one way or another.
Although the .NET dll will probably be selected automatically (as part of the Project). But you have to check if the unmanaged DLLs are detected properly and otherwise add them.
If this is about /Sytem32/ DLLs or files that are otherwise shared you may have a problem. You cannot install shared DLLs with ClickOnce, so you will have to copy to local. And then hope it works.