Visual Studio 2008 Web应用程序项目中的设计器文件的用途是什么?

时间:2022-09-01 08:12:20

There is a conversion process that is needed when migrating Visual Studio 2005 web site to Visual Studio 2008 web application projects.

将Visual Studio 2005网站迁移到Visual Studio 2008 Web应用程序项目时需要转换过程。

It looks like VS2008 is creating a .designer. file for every aspx when you right click on a file or the project itself in Solution Explorer and select 'Convert to Web Application.'

看起来VS2008正在创建一个.designer。在解决方案资源管理器中右键单击文件或项目本身并选择“转换为Web应用程序”时,每个aspx的文件。

What is the purpose of these designer files? And these won't exist on a release build of the web application, they are just intermediate files used during development, hopefully?

这些设计器文件的目的是什么?这些不会存在于Web应用程序的发布版本中,它们只是开发过程中使用的中间文件,希望如此?

2 个解决方案

#1


5  

They hold all the form designer stuff that used to go in the #Region " Web Form Designer Generated Code " section of the code. instead of putting it in the .aspx.vb file where people might edit it (mistakenly or not), it's been moved to a separate file, so that you don't have ever look at it.

它们包含了以前在代码的#Region“Web窗体设计器生成代码”部分中使用的所有表单设计器内容。而不是把它放在人们可能编辑它的.aspx.vb文件中(错误或不错),它被移动到一个单独的文件,所以你没有看过它。

#2


1  

What kibbee said.

什么kibbee说。

For the part of your question about existing on a release build, it depends on what kind of web site you have. If you have a pre-compiled web site, then none of code files (.vb, .cs, etc) need to be deployed the server. They are compiled into .dlls (assemblies) and deployed that way along with the .as*x files.

关于发布版本中存在的问题,这取决于您拥有的网站类型。如果您有预编译的网站,则不需要在服务器上部署任何代码文件(.vb,.cs等)。它们被编译成.dll(程序集),并与.as * x文件一起部署。

#1


5  

They hold all the form designer stuff that used to go in the #Region " Web Form Designer Generated Code " section of the code. instead of putting it in the .aspx.vb file where people might edit it (mistakenly or not), it's been moved to a separate file, so that you don't have ever look at it.

它们包含了以前在代码的#Region“Web窗体设计器生成代码”部分中使用的所有表单设计器内容。而不是把它放在人们可能编辑它的.aspx.vb文件中(错误或不错),它被移动到一个单独的文件,所以你没有看过它。

#2


1  

What kibbee said.

什么kibbee说。

For the part of your question about existing on a release build, it depends on what kind of web site you have. If you have a pre-compiled web site, then none of code files (.vb, .cs, etc) need to be deployed the server. They are compiled into .dlls (assemblies) and deployed that way along with the .as*x files.

关于发布版本中存在的问题,这取决于您拥有的网站类型。如果您有预编译的网站,则不需要在服务器上部署任何代码文件(.vb,.cs等)。它们被编译成.dll(程序集),并与.as * x文件一起部署。