What happen if I delete App.config in C# application?

自闭症网瘾萝莉.ら 提交于 2019-12-03 15:24:08

问题


I write a small application, that I don't need store anything in config files. So the file App.config in my source is exactly what ever Visual Studio has created.
So I want to delete this file from source code (before compiling). But I noticed that it also contains the .NET version information. I wonder if I delete App.config file, then copy my application to other pc, is it have any strange behavior?


回答1:


I wonder if I delete App.config file, then copy my application to other pc, is it have any strange behavior?

Nope, it should be fine. There are various (somewhat tortuous) rules about exactly what version of the CLR etc gets used in what situations, but for the most part you're fine to just rely on the default behaviour.

You really don't need an app.config file unless you need to give specific settings.



来源:https://stackoverflow.com/questions/20860308/what-happen-if-i-delete-app-config-in-c-sharp-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!