1

I'm new to this so sorry if this has been asked before. Basically I have added two separate projects into the one solution on visual studio. So form1 opens and has two buttons. When button 1 pressed >>>> form2 opens (Project 1) button 2 " >>>> form3 opens (Project 2) They both obviously had different .config settings. When I am in form2 I want the exe.config settings to be set for that project and vica versa for the other form. However only one .exe.config file can be used if I am correct in the executable.

Gooner1990
  • 35
  • 5
  • 1
    Why are you having two WinForms projects at the same time? This seems like an unnecessary dependency. – Arian Motamedi Oct 07 '14 at 15:41
  • One for testing and the other for configuring a device. Instead of having to contently open up a new .exe, they will be able to work together in the same solution – Gooner1990 Oct 07 '14 at 15:43
  • Don't do that, and only the .exe config file is used, so you'll have to deal with that (protip: we all have the same limitations, and we all deal with it fine out here) –  Oct 07 '14 at 15:43
  • You seem to be conflating forms, executables, and projects. Each project can generate an executable, yes, but you could also simply generate a class library (DLL) from the non-main one, which the main one consumes. Then you don't need interprocess communication and there's only one .exe.config file to manage. Finally, you can have any number of forms within a single project. – Cameron Oct 07 '14 at 15:45
  • Yes I did generate a class library from the two projects, So I have only one .exe.Config file but will that manage the two seperate projects – Gooner1990 Oct 07 '14 at 15:47
  • @Gooner1990: Ah I see. I misunderstood your question, sorry! I think this may be a duplicate of [this question](http://stackoverflow.com/questions/594298/c-sharp-dll-config-file). – Cameron Oct 07 '14 at 15:55

0 Answers0