Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8773257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:14:55+00:00 2026-06-13T18:14:55+00:00

In my ASP.NET project, I have an App_Code folder. In the folder are several

  • 0

In my ASP.NET project, I have an App_Code folder.

In the folder are several classes that work perfectly fine. The classes can see each other without any problems.

I have also added an Enums.cs file to the folder. The Enums.cs file contains the following code:

namespace xsite.App_Code
{
  public enum Bottle
  {
    Glass,
    Plastic,
    Paper
  }
}

Problem is that none of the classes in the folder can use the Bottle enum. When I try to use the enum, I get the following error:

The type or namespace name ‘Bottle’ could not be found (are you missing a using directive or an assembly reference?)

The namespace of the classes in the folder is the same as the enum.

Any idea how I can fix this, so I can use the Bottle enum?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T18:14:57+00:00Added an answer on June 13, 2026 at 6:14 pm

    If you could not access the enum by xsite.App_Code.Bottle then you have to check the properties of the file. Right click the file and take properties. There will be a property called Build Action, set it to Compile.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET project that contains many classes. I am thinking about creating
In a dynamically compiled ASP.NET Website project, can the assembly for the App_Code folder
I have a legacy ASP.NET/VB.NET WebSite. There several App_Code modules/code files that use types
I have an ASP.NET website project that until recent had all code in App_Code
I have accumulated an ASP.NET project that was running everything off of one page
I have an ASP.Net project using AJAX that I am putting on a server
I have several class files in App_Code in an ASP.net website running in Microsoft
I have a Code folder in my asp.net mvc web project, I added a
I have created an asp.net website, with the accompanying app_code folder. In the same
I have an asp.net 4.0 project that uses a combination of Bouncy Castle and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.