Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. App_Code problem

App_Code problem

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpcsharpasp-netsysadminquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Richard Jones
    wrote on last edited by
    #1

    I was using a project for months, no problem. Something changed 3 days ago in my project. Now it won't compile/run. It complains that every class in App_Code folder doesn't exist. They worked fine before. The files exist. The folder exists. I rename the Utilities.vb file and create a new one. Still says class undefined. I started a new Web App. Right-click on project->Add->Folder->App_Code (since the menu item App_Code isn't an option) Add a class to App_Code. I notice the Build Action is Compile. :omg: Switch back to 1st project. None of the classes are set to Compile. Okay, change that, Run. Now, it Builds the project, but the web server complains the classes are AMBIGUOUS. :sigh: Make up your bloody mind. Compiler Error Message: BC30175: class 'Utilities' and class 'Utilities', declared in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2d7f8030\4e18611d\App_Code.idisyg3r.3.vb', conflict in namespace '<Default>'. Source Error: Line 9: Imports CrystalDecisions.CrystalReports.Engine Line 10: Line 11: Public Class Utilities Line 12: Public Shared Function GetAuthenticationTypes() As IDictionary Line 13: Dim mySortedList As IDictionary = New SortedList() After 3 days of beating my head in, I realize my renamed class which is Excluded from the project, but still in the folder, is causing this. I delete it. Why on Earth would Studio interpret a class Excluded from the project just cause it's in the folder? And how did all my classes get set to Content, not Compile?

    Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon

    S 1 Reply Last reply
    0
    • R Richard Jones

      I was using a project for months, no problem. Something changed 3 days ago in my project. Now it won't compile/run. It complains that every class in App_Code folder doesn't exist. They worked fine before. The files exist. The folder exists. I rename the Utilities.vb file and create a new one. Still says class undefined. I started a new Web App. Right-click on project->Add->Folder->App_Code (since the menu item App_Code isn't an option) Add a class to App_Code. I notice the Build Action is Compile. :omg: Switch back to 1st project. None of the classes are set to Compile. Okay, change that, Run. Now, it Builds the project, but the web server complains the classes are AMBIGUOUS. :sigh: Make up your bloody mind. Compiler Error Message: BC30175: class 'Utilities' and class 'Utilities', declared in 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\2d7f8030\4e18611d\App_Code.idisyg3r.3.vb', conflict in namespace '<Default>'. Source Error: Line 9: Imports CrystalDecisions.CrystalReports.Engine Line 10: Line 11: Public Class Utilities Line 12: Public Shared Function GetAuthenticationTypes() As IDictionary Line 13: Dim mySortedList As IDictionary = New SortedList() After 3 days of beating my head in, I realize my renamed class which is Excluded from the project, but still in the folder, is causing this. I delete it. Why on Earth would Studio interpret a class Excluded from the project just cause it's in the folder? And how did all my classes get set to Content, not Compile?

      Cheetah. Ferret. Gonads. What more can I say? - Pete O'Hanlon

      S Offline
      S Offline
      Steven A Lowe
      wrote on last edited by
      #2

      i'm not positive about this, but it would appear that the IDE doesn't compile your web application, the asp.net compiler does; and it likes to compile everything in the web directory, whether it is part of your project or not

      Best regards, Steven A. Lowe CEO, Innovator LLC www.nov8r.com

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups