[英]App code in published asp.net app
I published my asp.net app using the basic capability (publish to disk). 我使用基本功能发布了asp.net应用程序(发布到磁盘)。 Now I look at the published content and it contains .cs files. 现在,我看一下已发布的内容,其中包含.cs文件。 Is this correct? 这个对吗? I did right-click 'convert to web application', but the .cs files still appear. 我确实右键单击了“转换为Web应用程序”,但是.cs文件仍然出现。
Apparently your conversion didn't take or your publish went wrong - according to MSDN: 根据MSDN的说法,显然您的转换没有完成,或者您的发布出错了:
"The conversion process causes Visual Studio to recursively examine every page, master page, and user control in the project, and to automatically generate a .designer.cs or .designer.vb file for each. Visual Studio also changes the .aspx or .ascx files to use the codeBehind attribute instead of the codeFile attribute. This conversion process also renames the App_Code folder to Old_App_Code. " “转换过程使Visual Studio递归检查项目中的每个页面,母版页和用户控件,并自动为每个页面生成.designer.cs或.designer.vb文件。VisualStudio还会更改.aspx或。 ascx文件使用codeBehind属性而不是codeFile属性。 此转换过程还将App_Code文件夹重命名为Old_App_Code。
See: MSDN Article 请参阅: MSDN文章
So if you see App_Code after conversion - something is screwy and you need to try it again. 因此,如果您在转换后看到App_Code-有点麻烦,则需要再次尝试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.