Currently I have 2 apps, App1 and App2.
App1 has an app.config file where I store the string InstallDir. I can access this from App1 fine using Properties.Settings.Default.InstallDir. Which works great, but I need to be able to access this from App2.
I changed the accessibility from Internal to Public in VS. When I try to access it from App2 I add a reference to App1 and use using App1; and App1.Properties.Settings.Default.InstallDir but it justs returns nothing. It doesn’t throw an exception, it just returns a blank string.
Any ideas greatly appreciated.
Every application has its own app.config file where it reads configuration from at runtime. You have referenced App1 in App2 which allows you to access the
App1.Properties.Settings.Default.InstallDirvariable but at runtime since there’s no corresponding value in the app.config of App2 it returns null.