9

当我构建我的应用程序时,我只得到一个bin文件夹,其中包含所有文件,而不是通常的bin\debug文件bin\release夹。为什么是这样?

4

3 回答 3

9

因为该网站可以在您构建的位置由 IIS(以及各种风格的...)运行。

IIS 需要 bin 文件夹中的程序集(在 AppDomain 设置中硬连线),因此 Web 项目类型编译到此位置。

于 2013-05-28T05:37:08.863 回答
2

For an interview, i was put across with this question. One of the link could be this which answers in brief .

The above link will give you the statement as below:-

Release Mode

When an assembly is built in release mode, the compiler performs all available optimisations to ensure that the outputted executables and libraries execute as efficiently as possible. This mode should be used for completed and tested software that is to be released to end-users. The drawback of release mode is that whilst the generated code is usually faster and smaller, it is not accessible to debugging tools.

Debug Mode

Debug mode is used whilst developing software. When an assembly is compiled in debug mode, additional symbolic information is embedded and the code is not optimised. This means that the output of the compiler is generally larger, slower and less efficient. However, a debugger can be attached to the running program to allow the code to be stepped through whilst monitoring the values of internal variables.

[Update] After little google i came across similar question- "Confused about Release/Debug folders in Visual Studio 2010" with same answer which i have quoted above.

Also, please look into why-have-separate-debug-and-release-folders-in-visual-studio. @riko and other members of Stackoverflow have answered quiet well..

于 2013-05-28T06:02:33.443 回答
1

此行为并非特定于 MVC4。事实上,它与所谓的“经典”ASP.Net 一致,包括网站项目和 Web 应用程序。

ASP.Net 中发布模式和调试模式之间的区别在于发布版本需要发布。

于 2013-05-28T06:09:35.330 回答