amit patel
amit patel

Reputation: 2297

The Type Class (in app_Code) exists in both "solution.dll" and "app_code.wxdafd.dll"

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

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)

See below,

enter image description here

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.

Upvotes: 23

Views: 11757

Answers (1)

Rob
Rob

Reputation: 45761

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'.

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

Upvotes: 47

Related Questions