Madmenyo
Madmenyo

Reputation: 8584

Visual Studio not showing my .aspx file in Solution Explorer

I have a index.aspx in the project root but the solution explorer does not show the file.

I first started out with a html file, then I wanted to convert it to an ASP file. So I pressed save index.html as... and choose index.aspx as the new file name. But then I started getting error windows when editing the index.aspx. I noticed index.html was still in the root of the solution but did not show in VS-2013 solution explorer. So I figured I get rid of the index.aspx inside the solution explorer but both files disappeared from my disk. I somehow managed to retrieve the index.aspx but I cannot get it in the solution explorer. When I open the file manually the error windows are gone but I'm afraid I might have broken a link I'm unaware of in the program by deleting it in the Solution Explorer.

-Edit- I could just create a new webforms file and copy the contents but the issue described above feels strange and unexpected. I like to have it clarified.

Upvotes: 2

Views: 4479

Answers (1)

garryp
garryp

Reputation: 5776

You've deleted it from your solution.

  1. Right click your solution.

  2. On the toolbar at the top of Solution Explorer find the "Show all files" icon and click it. You can now see all files on the file system, not just those included in your solution.

enter image description here

  1. Find the file, right click and include it in your project. It'll have an icon that looks like this:

enter image description here

Upvotes: 7

Related Questions