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 7934173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:33:55+00:00 2026-06-03T21:33:55+00:00

I’m not sure if this is a bug or something else. I create a

  • 0

I’m not sure if this is a bug or something else.

I create a new Web Application project in VS2010. In the project, I create a new class (Class1), with the following contents:

public void Test()
{
    var s = "Hello";
    Console.WriteLine(s);
}

When I hover my mouse over s in the Console.WriteLine(s) line, a popup appears showing (local variable) string s. Great, just as I expect.

Correctly showing s to be of type string

Now, I add an App_Code folder to the project. Inside it, I again create a new class (Class2), with the exact same contents (except the class name). Now, when I hover s, it shows (local variable) var s.

Incorrectly showing s to be of type var

Why is it showing var in stead of string? Is this a bug? Can you reproduce this behavior?

It’s even worse. If I move Class2.cs from the App_Code folder to the root of the project, VS2010 still doesn’t show the type. Even after restarting VS2010 and reopening the project, VS2010 will show the correct type in Class1 but not in Class2. I’ve also tried deleting the .suo and .csproj.user files, but still no difference. Apparently VS2010 caches this information somewhere.

  • 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-03T21:33:56+00:00Added an answer on June 3, 2026 at 9:33 pm

    The App_Code directory is a special directory for Web Site projects.

    In Web Application projects, code placed inside the App_Code directory is ignored by VS.

    I noticed this behavior when migrating a Web Site to a Web Application project.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.