Type类(在APP_ code)存在于两个" solution.dll"和" APP_ code.wxdafd.dll" [英] The Type Class (in app_Code) exists in both "solution.dll" and "app_code.wxdafd.dll"

查看:167
本文介绍了Type类(在APP_ code)存在于两个" solution.dll"和" APP_ code.wxdafd.dll"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在C#.net web应用1,并作出APP_ code所在的文件夹中创建一个文件

I have made one webapplication in C#.net and make a app_code folder where one file in created

名为SessionHelper.cs(属性正确设置为编译,以便它可以在web应用访问)

named "SessionHelper.cs" (property set correctly to "Compile" so that it can access in Webapplication)

使用它来设置和获取会话指标的影响,当我尝试调试它,给了我价值,如下图中的监视窗口

it uses to set and get session parametes, when I try to debug it, gives me "Value" as below in "Watch window"

app_code.SessionHelper.IsURLCheckSupport(Name)

    The type 'Solution.Web.app_code.SessionHelper' exists in both 
'Solution.Web.dll' and 'App_Code.wgj24okr.dll'  (value)

见下文,

所以我不能够同时调试它获得的价值,还有什么能为这个解决方案。

So i am not able to get the value while debug it, what can be the solution for this.

请让我知道,如果你想要更多的细节。

Please let me know, if you want more details.

推荐答案

这是发生因为你的项目是一个Web应用程序,当你在Visual Studio编译,所有的code在您的网站(包括 APP_ code )被编译成一种叫做装配,在这种情况下, Solution.Web.dll 。当你运行你的网站,asp.net知道所谓的特殊的文件夹 APP_ code 并编译它的内容到一个装配一个独特的名字,在这种情况下`APP_ code.wgj24okr.dll。

This is occuring because your project is a "Web Application", when you Compile in Visual Studio, all the code in your site (including in App_Code) gets compiled into an assembly called, in this instance, Solution.Web.dll. When you run your site, asp.net knows about a "special" folder called App_Code and compiles the content of it into an assembly with a unique name, in this instance `App_Code.wgj24okr.dll'.

解决方案之一是你的 APP_ code 文件夹重命名为其他名称,如 code

One solution is to rename your App_Code folder to another name, such as Code.

这篇关于Type类(在APP_ code)存在于两个" solution.dll"和" APP_ code.wxdafd.dll"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆