Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Why do some C# applications have an app.config file and others do not? Both of these solutions were initialized as Visual C# Windows Form Applications.

This one I created in Visual Studio Community version:
https://photos.app.goo.gl/DqS2tNUfHv6PHpiL8

This screen capture bit is from a youtube tutorial. I followed along with the instructor in the video and He created it with a menu selection as a Visual C# -> Windows Form Application.
https://photos.app.goo.gl/jR9jvFurWp4hMuve9

What I have tried:

I tried following along with the tutorial and I noticed that the instructor's IDE, Visual Studio Community version, had a Solution Explorer that included the app.config file. I am curious and concerned because I believe system settings can be entered into the app.config file and so his code will be different from mine and my code might not even run at all.
Posted
Updated 24-Jan-24 11:06am
v5

1 solution

It depends. It depends on if you are creating a .Net Framework app, which has by default an app.config[^] file; or if you are creating a .Net (core) app, which does not. There are other differences, like the .csproj file and more.

The same code will work in both Frameworks, .Net (core) is newer, will run faster, and can also have a config file, named appsettings.json[^], however not required by default.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900