VS 2008:如何在没有 DLL 的情况下发布?

发布于 2024-08-12 01:49:56 字数 259 浏览 5 评论 0原文

我在 Visual Studio 2008 中开发了一个 Web 应用程序,并希望将其发布到生产服务器。我在那里看到了一个发布选项。但是它用 DLL 生成文件。我不想只发布 asps 文件和 dll,而是想使用 aspx 文件和 aspx.cs 文件。这将帮助其他开发人员下载代码并在需要时修改它,并在需要时进行调试。

我尝试从 aspx 页面中的 Page 指令中删除 Inherits 属性,但是下次当我想为服务器端控件添加偶数时,它会添加到 aspx 页面本身中,而不是后面的代码中

I have developed a web application in Visual Studio 2008 and want to publish it in to the production server. I see a publish option there.But its producing files with DLL. I dont want to publish only asps files and dll's , Instead i want to use the aspx files and aspx.cs file .This would help other developers to download the code and modify it whenever required od debug it if there is any need.

I tried to remove the Inherits attribute from the Page directive in the aspx page, but next time when i want to add an even for a server side control, Its getting added in the aspx page itself,not the code behind

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

静谧 2024-08-19 01:49:56

Visual Studio 中的“Web 应用程序”在本地计算机上编译,然后作为 DLL 和一些支持文件上传到服务器。 Visual Studio 中的“网站”由 App_Code 文件夹中的代码文件以及 .aspx 和 .aspx.cs 文件组成。要进行部署,请将所有内容复制到服务器,然后服务器上的 .NET 运行时在首次访问文件时动态进行编译。

因此,要完成您所要求的操作,听起来您应该将您的网络应用程序转换为网站。然后,只需压缩所有内容,将其复制到服务器,解压缩,就完成了。

A "web application" in Visual Studio is compiled on your local machine, and then uploaded to the server as a DLL and some support files. A "web site" in Visual Studio is organized with code files in the App_Code folder, plus your .aspx and .aspx.cs files. To deploy you copy everything up to the server, and the .NET runtime on the server does the compilation dynamically, when the files are first accessed.

So, to do what you're asking for, it sounds like you should convert your web application to a web site. Then, just zip everything up, copy it to the server, unzip, and you're done.

转身以后 2024-08-19 01:49:56

如果您想同时发布 aspx 和 .cs 文件,以便与其他开发人员共享,您可以复制整个网站,包括所有 csprojectsslns

更好的方法是在服务器上设置源代码控制,当您签入代码时,在服务器上编译代码并从那里提供页面。这样,任何有权访问机器的人都可以在必要时介入并进行调试

If you want to publish both of aspx and .cs file, in order to share with other developer, you can just copy over the whole website, with all the csprojects and slns.

A better way is to setup a source control at your server, and as you checkin your code, compile your code at the server and serve the pages from there. In this way anyone who has access to the machine can just step in and debug, if necessary

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文