0

I am new to VS 2012. I have a global file in my Solution Explorer that needs to load with the solution. Folders that load have a blue globe icon but the folder not loading has a grey spoke image. Is there a simple way to get this folder to load?

enter image description here

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'EnableWebApp.Global'.

Source Error:

Line 1: <%@ Application Codebehind="Global.asax.cs" Inherits="EnableWebApp.Global" Language="C#" %>

Source File: /global.asax Line: 1

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929

<%@ Application Codebehind="Global.asax.cs" Inherits="EnableWebApp.Global" Language="C#" %>
ERROR ON THIS LINE: A namespace cannot directly contain members such as fields or methods
Note: I did not alter this file and it was working yesterday!!
stevenpepe
  • 267
  • 4
  • 16
  • Could you provide a screenshot please? – The Vanilla Thrilla Sep 25 '13 at 13:43
  • Are you unable to open the Global.asax by double clicking it? What does it say? Check to see if the file still exists by right clicking your project, selecting Add --> Existing Item. Browse out to where your project is located and see if the Global.asax is there. If so, simply re-add it to your project. – The Vanilla Thrilla Sep 25 '13 at 14:06
  • Please see this: http://stackoverflow.com/questions/2005747/could-not-load-type-namespace-global-causing-me-grief – The Vanilla Thrilla Sep 25 '13 at 14:09

1 Answers1

0

I think you'll find it is just the icon for the item is grey, not blue like the ASPX files

Chris Hammond
  • 2,064
  • 5
  • 27
  • 53
  • The solution needs this file to load it's class, but it is returning a "Cannot load type" error. Am I correct in assuming it needs a blue globe icon to load? – stevenpepe Sep 25 '13 at 14:03
  • As stated, the blue badge is just the icon for an ASPX... the icon for and ASAX is a grey cog... What "type" cannot be loaded? Perhaps you could post the actual error message? – Chris Hammond Sep 25 '13 at 14:05
  • Does the namespace in the Mark Up match that in the CS? In the solution Explore is the Build Action of the CS file set to COMPILE? – Chris Hammond Sep 25 '13 at 14:08
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/38035/discussion-between-chris-hammond-and-stevenpepe) – Chris Hammond Sep 25 '13 at 14:29