ASP.net编译dll [英] ASP.net compiled dlls
问题描述
他们在哪里存储?有没有办法确定什么时候被删除?是否有办法让它们永远不会被删除,以提高性能?
Where are they stored? And is there a way to determine when they get deleted? Is there a way to make it so that they are never deleted, so as to improve performance for example?
另一个问题 - 在繁忙的主机环境中, dll的?
Another issue - in a busy hosting environment how big could all the dll's get? Let's say if you have 1000 medium websites?
推荐答案
他们在哪里存储?
Where are they stored?
这取决于是否在部署前或部署后编译它们。如果在部署之前编译它们,您将直接将它们部署到应用程序的/ bin文件夹。这是我通常做的。
It depends on if you compile them before deployment or after deployment. If you compile them before deployment you will deploy them directly to the /bin folder of your app. This is what I normally do.
如果你在部署之后让asp.net编译,那么他们可以结束一些地方,这不是我通常关心的。它们只有在网站中的某些内容发生更改时才会重新编译,因此不会被删除,只是被覆盖。
If you let asp.net compile after deployment there are a couple places they can end up, and it's not something I usually concern myself with. They are only re-compiled if something in the site changes, and so they are not deleted ever, merely over-written.
编译的dll文件的大小通常类似于用于构建它的源文件。
The size of a compiled dll file is generally comparable to that of the source files that are used to build it.
请注意,这些.Net dll主要由IL组成,并且尚未具有完全编译的本机代码。当您的应用程序启动时(在asp.net中:当第一个http请求进来时)由即时编译器采用其他方式到本地代码。你可以使用像ngen这样的工具来预编译它们,但是这通常不是最好的选择。同样,这个最终代码的位置不是我通常关心的。
Note that these .Net dlls consist mainly of IL and do not yet have fully-compiled native code. They will be taken the rest of the way to native code when your app is started (in asp.net: when the first http request comes in) by the just-in-time compiler. You can use a tool like ngen to pre-compile them, but this is not normally the best option. Again, the location of this final code is not something I normally concern myself with.
这篇关于ASP.net编译dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!