Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 4th, 2007, 06:49 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default App_Code class compiled twice? xxx exists in both

who knows how to fix this:

Code:
The type 'Jennison.Affirm2.BLL.BizObject' exists in both '{AAD7306F-132A-4A58-906B-A2E1BEB84615}' and '{9302F7D0-6B02-4DFC-B740-B945F93DB468}'
 my app code classes are compiled twice!

 
Old January 5th, 2007, 10:30 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This sounds like a problem with the web application project. Are you using that for the project type? If that's the case then here's what's going on:

You compile the application in the IDE. This includes all the code files in the App_Code directory because they are included in the project list of code files. Then you run your application. .NET 2.0 automagically compiles everything in the App_Code directory when you start running your web app. This then results in 2 assemblies, one for the explicitly compiled application (Jennison.Affirm2.BLL) and one for the dynamically compiled code in the App_Code directory.

You need to move all the code files out of that directory so there isn't anything to dynamically compile.

-Peter
 
Old January 5th, 2007, 11:22 AM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by planoie
 This sounds like a problem with the web application project. Are you using that for the project type? If that's the case then here's what's going on:

You compile the application in the IDE. This includes all the code files in the App_Code directory because they are included in the project list of code files. Then you run your application. .NET 2.0 automagically compiles everything in the App_Code directory when you start running your web app. This then results in 2 assemblies, one for the explicitly compiled application (Jennison.Affirm2.BLL) and one for the dynamically compiled code in the App_Code directory.

You need to move all the code files out of that directory so there isn't anything to dynamically compile.

-Peter
thanks. understood. i cant do that, however, because the code i am working with has this in the web.config
Code:
  <configSections>
    <section name="aaatest" type="xxx.xxx.aaaSection, __code"/>
  </configSections>
the __CODE tells it to look in the app_code folder.

???

c

 
Old January 5th, 2007, 11:34 AM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

got it working!

 
Old January 5th, 2007, 03:05 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What did you do to get it working?

-Peter
 
Old January 5th, 2007, 03:45 PM
Registered User
 
Join Date: Jan 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

removed the ref to __code, just left that part blank, and moved code out of app_code.
i hated that folder.

thanks for help!






Similar Threads
Thread Thread Starter Forum Replies Last Post
use app_code vb class instead of codebehind keyvanjan ASP.NET 2.0 Professional 2 July 25th, 2007 10:12 AM
xxx is not a member of 'Membership' bcr212 ASP.NET 2.0 Basics 7 June 29th, 2006 10:41 AM
New option("xxx", "xxx") Ma7T Javascript How-To 3 August 3rd, 2005 09:42 AM
App.xxx ONLY via API - Help ! Peppiniello Pro VB 6 1 December 23rd, 2004 04:38 PM
Http://localhost/xxx/xxx/xxx.aspx Question bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 2 June 11th, 2004 09:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.