none
Areas disappeared from solution

    Question

  • I have a solution with around 10 different Areas, each one containing the controllers, model and views for a separate database. I was building the project and checking on an error that was found when VS 2015 stopped responding. When it came back a few minutes later the Area folder was gone along with all its contents. It doesn't appear that it's just been hidden, show all files is checked and the folder no longer appears in the file structure on the computer. Has anyone come across this before?
    Tuesday, September 13, 2016 12:14 PM

Answers

  • Hi chellemcg,

    According to your description, the issue happened in a project that created two years ago.

    >>I added a new view, built the project and got an error about one of the mapping files. When I clicked to open the file I got a Visual Studio Not Responding message

    Please share me screenshots about “getting an error for one of the mapping files” and “VS Not Responding message”.

    Please try the following steps to troubleshoot this issue:

    1). You could create a new project that contains serval different Areas. And build you project to observer whether this issue occurs again. In my side, I have created a MVC4 project with VS2015 Enterprise, and added 11 Areas to the project. After building the project, the Areas also exist. Please refer to the following screenshot:

    This method could help us to check whether this issue caused by VS or the project.

    2). Please make sure all hidden files are displayed in the folder of the project, enable the Hidden items option as the following screenshot:

    3). To check the Areas whether have been deleted. You could add a same Area to your project, if VS remind you the same Area has already existed that indicates the original Areas already exist. If VS does not give you this message, I think the Areas not exist in the folder of the project. Then please refer to dvaibhav’s reply to check the Recycle bin.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Monday, September 19, 2016 7:33 AM
    Moderator

All replies

  • Our the classes still in the solution but not showing or are they simply not in the solution any more?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Tuesday, September 13, 2016 12:23 PM
  • They don't appear to be in the solution anymore, as they're neither showing in the Solution Explorer or in the storage location on the hard drive.
    Tuesday, September 13, 2016 1:46 PM
  • Hi chellemcg,

    Have you checked Show all files option of Solution explorer.

    Just for Clarification.

    Tuesday, September 13, 2016 1:52 PM
  • Yes, tried that. Also found a thread about updating extensions to force cache to be updated in order to show files that had become hidden but that didn't change anything.
    Tuesday, September 13, 2016 2:08 PM
  • VS won't delete files/folders from a solution without an implicit command from you. It is possible for it to "lose" new files but they won't be removed from disk. It sounds like something else happened.  These could include:

    • You didn't actually place the Areas folder and children in the same path as the project. This is possible but not trivial to do.
    • The files were moved to your Recycling Bin.
    • You opened the solution from Source Control and may have requested a fresh copy.
    • You asked VS to sync your SCC files with your local machine and it wiped the missing files.

    Michael Taylor
    http://www.michaeltaylorp3.net

    Tuesday, September 13, 2016 5:50 PM
  • Sorry but I didn't do any of the above. The Areas folder was where it's been since the project was created over two years ago. It contained 18 areas, each with its Controllers, Models and Views folders. I added a new view, built the project and got an error about one of the mapping files. When I clicked to open the file I got a Visual Studio Not Responding message, and when that cleared the Areas folder was gone.
    Wednesday, September 14, 2016 8:30 AM
  • Still there is one last chance..

    Check your Recycle bin.Hope that Area folder may exists.

    Wednesday, September 14, 2016 12:03 PM
  • If your project is several years old then don't you have it in source control? If so then you can retrieve it back. But VS itself won't delete files on a crash. However if you have file recovery turned on, when you restart VS it'll prompt you to restore the files that it detects were corrupted. If you opt not to then it'll wipe the files that it had a backup of (your new files). But it still won't delete folders.

    I suspect that something else caused the folders to be wiped but I cannot answer as to what. I would probably narrow it down to: a third party extension you have installed, AV that put it into quarantine or a corrupted sector on disk. But these would be guesses.

    Wednesday, September 14, 2016 1:50 PM
  • Hi chellemcg,

    Since your problem is more related to Visual Studio General Questions, I will move it to Visual Studio General Questions Forum for support.

    The Visual C# forum discuss and ask questions about the C# programming language, IDE, libraries, samples, and tools.

    If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

    Thanks for your understanding and cooperation.

    Best Regards,

    Wendy


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 15, 2016 1:46 AM
  • Hi chellemcg,

    According to your description, the issue happened in a project that created two years ago.

    >>I added a new view, built the project and got an error about one of the mapping files. When I clicked to open the file I got a Visual Studio Not Responding message

    Please share me screenshots about “getting an error for one of the mapping files” and “VS Not Responding message”.

    Please try the following steps to troubleshoot this issue:

    1). You could create a new project that contains serval different Areas. And build you project to observer whether this issue occurs again. In my side, I have created a MVC4 project with VS2015 Enterprise, and added 11 Areas to the project. After building the project, the Areas also exist. Please refer to the following screenshot:

    This method could help us to check whether this issue caused by VS or the project.

    2). Please make sure all hidden files are displayed in the folder of the project, enable the Hidden items option as the following screenshot:

    3). To check the Areas whether have been deleted. You could add a same Area to your project, if VS remind you the same Area has already existed that indicates the original Areas already exist. If VS does not give you this message, I think the Areas not exist in the folder of the project. Then please refer to dvaibhav’s reply to check the Recycle bin.

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Monday, September 19, 2016 7:33 AM
    Moderator
  • Hi chellemcg,

    Please feel free to let me know your latest results. Thank you very much.

    Have a nice day :).

    Sincerely,

    Oscar


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate the survey.

    Wednesday, September 21, 2016 8:16 AM
    Moderator