gpt4 book ai didi

visual-studio-2012 - Visual Studio 是如何对 App_Code 文件夹进行特殊处理的?

转载 作者:行者123 更新时间:2023-12-02 07:34:17 26 4
gpt4 key购买 nike

当在 App_Code 文件夹中进行更改或检测到更改时,Visual Studio 如何处理 App_Code 文件夹?不是 IIS 或 ASP.NET。

我想更好地理解为什么每当我将代码文件保存在网站项目的大型 App_Code 文件夹中时,Visual Studio 会长时间卡住。或者,我可能会问:为什么 Visual Studio 在处理同样大的类库中的文件时没有表现出这些相同的卡住?

理想情况下,我希望看到 Microsoft 引用的官方文档,说明在 Visual Studio 中处理 App_Code 文件夹时遇到的问题,以及与处理类库不同的情况。

最佳答案

The App_Code folder is not explicitly marked as containing files written in any one programming language. Instead, the ASP.NET infers which compiler to invoke for the App_Code folder based on the files it contains. If the App_Code folder contains .vb files, ASP.NET uses the Visual Basic compiler; if it contains .cs files, ASP.NET uses the C# compiler, and so on.

If the App_Code folder contains only files where the programming language is ambiguous, such as a .wsdl file, ASP.NET uses the default compiler for Web applications, as established in the compilation element of the application Web.config file or the machine-level Web.config file. Compilers are named build providers and a build provider is specified for each file extension in an extension element.

参见 documentation在这里。

关于visual-studio-2012 - Visual Studio 是如何对 App_Code 文件夹进行特殊处理的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18478566/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com