问题
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?
Another issue - in a busy hosting environment how big could all the dll's get? Let's say if you have 1000 medium websites?
回答1:
Where are they stored?
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.
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.
The size of a compiled dll file is generally comparable to that of the source files that are used to build it.
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.
回答2:
You're probably looking for the Temporary ASP.NET Files
folder, which is inside the .NET Framework directory. See http://msdn.microsoft.com/en-us/library/ms366723.aspx for more information.
来源:https://stackoverflow.com/questions/3508701/asp-net-compiled-dlls