使用发布和部署 ASP.NET 网站.dll .编译文件

发布于 2024-08-21 05:29:33 字数 169 浏览 2 评论 0原文

当我们发布 ASP.NET 网站时,会在“bin”文件夹下创建 2 种文件类型:.dll 和 .dll。 .编译的文件。当我们部署到生产环境时,我们需要复制 .compiled 文件还是只复制 .dll 就可以了?

我知道此时它已预编译,但是 .compiled 文件是做什么用的?

TIA

when we publish an asp.net website, there are 2 file types created under 'bin' folder, .dll & .compiled files. When we deploy to production do we need to copy the .compiled files or just copying .dll will do?

I know it's precompiled at this point but what's the .compiled file for ?

TIA

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

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

发布评论

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

评论(1

捎一片雪花 2024-08-28 05:29:33

我相信您确实需要复制它们,但一个简单的检查是不要复制一次,看看会发生什么。 来自 MSDN,它们仅用于在该页面/控件/主控上提供请求时找到正确的程序集:

.compiled Files

对于 ASP.NET Web 应用程序中的可执行文件,编译器程序集和文件扩展名为 .compiled 的文件。程序集名称由编译器生成。 .compiled 文件不包含可执行代码。相反,它仅包含 ASP.NET 查找适当程序集所需的信息。

部署预编译的应用程序后,ASP.NET 使用 Bin 文件夹中的程序集来处理请求。预编译输出包括 .aspx 或 .asmx 文件作为页面的占位符。占位符文件不包含任何代码。它们的存在只是为了提供一种为特定页面请求调用 ASP.NET 的方法,以便可以设置文件权限来限制对页面的访问。

I believe you do need to copy them, but an easy check would be not to once and see what happens. From MSDN, they're only used to find the right assembly when serving a request on that page/control/master:

.compiled Files:

For executable files in an ASP.NET Web application, the compiler assemblies and files with the .compiled file name extension. The assembly name is generated by the compiler. The .compiled file does not contain executable code. Instead, it contains only the information that ASP.NET needs to find the appropriate assembly.

After the precompiled application is deployed, ASP.NET uses the assemblies in the Bin folder to process requests. The precompilation output includes .aspx or .asmx files as placeholders for pages. The placeholder files contain no code. They exist only to provide a way to invoke ASP.NET for a specific page request and so that file permissions can be set to restrict access to the pages.

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