没有名称为“< pre> app_code< / pre>”的文件夹发布后在我的网站上 [英] There is no folder with name "<pre>app_code</pre>" in my website after publish

查看:84
本文介绍了没有名称为“< pre> app_code< / pre>”的文件夹发布后在我的网站上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

在我的网站上有一个名为

hello
there is a folder with name "

App_Code

的文件夹。

这个文件夹被创建之后我在我的网站上添加了一个web服务页面。

和其中的一些必要文件。

但是在发布之后,这个文件夹不存在于已发布的文件中。

为什么?

谢谢



我尝试过:



i couldent做关于这个主题的任何事情

" in my website.
this folder be created after i add a webservice page to my website.
and some necessary files in it.
but after publish, this folder dont be exist in published files.
why?
thanks

What I have tried:

i couldent do any things about this subject

推荐答案

这是正常的。 App_Code 文件夹中的文件将被编译到 bin 文件夹中的程序集中。预编译/发布的站点不需要 App_Code 文件夹。
This is normal. The files in the App_Code folder will be compiled into an assembly in the bin folder. The App_Code folder is not required for a precompiled / published site.


这是设计使然。文件夹中的代码将被编译到项目 DLL 文件中,该文件将位于 BIN 文件夹中。



您可以在上阅读有关结构的更多信息。 ASP.NET Web项目文件夹结构 [ ^ ]



以下是与您的问题相关的部分:

This is by design. The code that is within the folder will be compiled into the projects DLL file which will be located in the BIN folder.

You can read more about the structure at ASP.NET Web Project Folder Structure[^]

Here is the portion relevant to your question:
App_Code Contains source code for shared classes and business objects (for example, ..cs, and .vb files) that you want to compile as part of your application. In a dynamically compiled Web site project, ASP.NET compiles the code in the App_Code folder on the initial request to your application. Items in this folder are then recompiled when any changes are detected.

Note: You can add any type of class file to the App_Code folder in order to create strongly typed objects that represent those classes. For example, if you put Web service files (.wsdl and .xsd files) in the App_Code folder, ASP.NET creates strongly typed proxies for those classes.


我认为

你必须在发布之前至少在这个文件夹中使用一个class.cs

所以在发布的文件中不存在任何空文件夹。
i think
you must but one class.cs at least in this folder before do published
so any empty folder dont be exist in published files.


这篇关于没有名称为“< pre> app_code< / pre>”的文件夹发布后在我的网站上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆