为什么该程序集是一个临时的asp.net dll? [英] Why is this assembly a temporary asp.net dll?
问题描述
我已经将我的网站项目预编译为整个网站的单个dll.当我运行页面并查看:
I have precompiled my web site project into a single dll for the whole site. When I run a page and look at:
Assembly.GetAssembly(this.GetType())
解析为:App_Web_qgqyxtge
It is resolving as : App_Web_qgqyxtge
但是当我打电话给:
Assembly.GetExecutingAssembly()
解析为:
上传,版本= 1.0.0.0,文化=中性,PublicKeyToken =空
Upload, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
我正在努力查看为什么我正在查看的页面的汇编看起来像一个临时的asp.net dll,而不是看起来似乎正在执行当前代码的已编译dll?
I'm struggling to see why the assembly of the page I am looking at looks like a temporary asp.net dll and not the compiled dll that seems to be executing the current code?
推荐答案
这可能是因为与Web应用程序项目相比,您使用的是Web站点项目,并且存储在 App_Code
文件夹中的所有类将自动出现.被编译成临时程序集.
That's probably because you are using a Web Site project in contrast to Web Application project and all classes stored in your App_Code
folder will automatically be compiled into temporary assemblies.
这篇关于为什么该程序集是一个临时的asp.net dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!