开发者

Deployment of Visual Studio solution containing dll project and exe project

开发者 https://www.devze.com 2023-04-13 05:03 出处:网络
I have a Visual Studio 2010 solution that contains 3 projects: a dll project, an executable project, and the Installer project.

I have a Visual Studio 2010 solution that contains 3 projects: a dll project, an executable project, and the Installer project.

I am working on the dll and the executable concurrently. The executable is simply a front end for the library. While developing the two in Visual Studio I simply added a reference to the dll project from within the executable and it works fine.

What I'm having trouble with is the deployment. Ideally the dll would be compiled and installed in a subdirectory of the executable. Using the "Visual Studio Installer - Setup Wizard" project template for my installer doesn't seem to be giving me the options I need.

Am I going about this wrong by developing my backend开发者_StackOverflow and frontend in different projects? What steps should I take to deploy the compiled dll along with the executable? I may be going about this all wrong, so please help me understand a better methodology if this seems backwards. For all the programming I learned in college, no one ever went over what I do when I actually want to deploy my software.


Since the DLL project is explicitly referenced from the EXE project, it is automatically copied in the EXE's build folder (i.e. bin\Debug or bin\Release) and is considered part of EXE project's "primary output". As a consequence, you only need to reference the EXE from your setup project.

The installed DLL will be in the same folder as EXE. Why would you want to install the DLL in a different folder on the user's machine if it is not there on the development machine? If you are loading it dynamically and using reflection, then don't reference it from EXE, but do reference it from the setup project, which then gives you the power to set whatever target folder you want.


This is what you need to do.

On your Solution create new Project > Other project Types > Click Setup and Deployment

On The Application Folder > right click > Then Add your front end Application > Build.

Check this

Regards

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号