问题
I'm reading a book about MVC ASP.NET, there are some hidden project setup that you can only modify by 'unload'
the whole first(then all the structure gone), then after clicking 'edit'
, change the xml tag value.
That reminds me to ask: why we need to unload the project before we modify the config file? Can anybody tell me the meaning of unloading project?
Why not just open the folder location and change by Notepad?
回答1:
It can be useful to unload a project from a solution while resolving circular dependencies between projects or conflicts with different versions of the .NET framework between projects.
It is considerably more difficult and error-prone to directly edit the configuration files with Notepad.
回答2:
Editing your project file is not something you are going to do often. By making you unload the project before editing it, they are making it hard on purpose. This will keep you from accidentally changing something.
Microsoft tries to make a habit of protecting us from ourselves. For example
- Each
case
mustbreak
in aswitch
. unsafe
keyword is required if you are doing pointer manipulation.new
keyword to hide inherited members.
回答3:
Assuming your talking about the project file, it helps when editing in Visual Studio because you get all the syntax highlighting, xml schema support, etc. Sure this could be done without unloading, but I guess Microsoft are trying to force you into a particular workflow.
来源:https://stackoverflow.com/questions/18134170/whats-the-point-of-unloading-project-in-visual-studio