1

can someone explain me how i can create visual studio 2022 installer from 1 main app and 2 class library.

To explain more further, i created a winform app that contain: 1-the main winform project; 2-a class library for all my database code; 3-another class library for all my others repetitive codes.

I have no clue how i show link/reference/add or wtv i need to do to include my class library dll into the installer so once the app is installed it can use these dll.

As usually i searched youtube and google but its really frusstrating that c# community is really small, you almost never find the right post for your problem so in last try im asking in here.

enter image description here

CSharpMan
  • 11
  • 2
  • Does your application project reference these libraries - either the projects or the compiled DLLs? – jmcilhinney Jun 11 '23 at 14:22
  • yes they are referenced but when i try to install it to another computer it seems like dll missing. Seem like the exe still use project path dll – CSharpMan Jun 12 '23 at 01:40
  • Is `Copy Local` set to `True` for those references? How exactly have you configured the Setup project. If you don't tell us what you've done, we can't tell what you've done wrong. – jmcilhinney Jun 12 '23 at 02:10
  • Sry, i edited my post and added a pic so you can see the structure. So basically, i added reference to the 2 library class in my winform project, so it set a path reference. Whatever i try, when i install the .msi package, it keep getting referencing on my project folder. Im used to build single project in the installer so habitually everything go smooth but with these 2 dll class, i have no clue what i should do and i cant find usefull infos nowhere. – CSharpMan Jun 12 '23 at 03:34
  • Did you reference the compiled DLLs from the Debug folder (bad) or reference the project itself (good)? It looks like you may have done the former when you should have done the latter. Have you set `Copy Local` to `True` for those references? It appears not. Setting `Copy Local` to `True` will make those DLLs part of the output that the Setup project will package for you. – jmcilhinney Jun 12 '23 at 04:33
  • @jmcilhinney i just did what u told me. I deleted the references to the direct dll and referenced the project itself, set copy local to "yes" but now the app dont recognize the class library in vstudio too. Any idea? – CSharpMan Jun 12 '23 at 05:52
  • nvm my friend it work inside vs 2022 im trying to see if it work in .msi, should i do like usually and dll will be setted by themselves? btw thx for taking time to help me, i truly appreciate – CSharpMan Jun 12 '23 at 06:05
  • well it just dont want to work, thats weird... if someone can give a hand it would be really nice! – CSharpMan Jun 12 '23 at 19:59
  • Up... still no ones??? – CSharpMan Jun 20 '23 at 02:01

0 Answers0