Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Wednesday, September 23, 2015 10:58 PM
I have a desktop solution that I recently converted from VS 2012 to VS 2015. This solution has 33 projects. In projects that have folders, I cannot view any of the files inside the folders. For example, inside the main application project I have a folder called Forms. Inside the Forms folder are all of the Windows Forms in the application. From the IDE, this folder appears to be empty. I cannot view or open any of the forms. I know the files are still part of the project because the application compiles and runs, and I can see the files in source control.
This problem afflicts all projects that have folders in them in this solution. For example, I have database projects that each has a dbo folder, with sub-folders for Tables, Stored Procedures, and Views. I cannot see or open any of the files in these projects, even though they exist in the file system, are part of the project, and compile with the solution.
This problem exists for new folders and files I add to any of these projects, not just folders that were there when I converted the solution. If I create a folder called Hello and add a class to it, I can see the folder but not the class.
This problem does NOT afflict new solutions I create. It only afflicts the projects inside this existing solution that I converted from VS 2012. It also does not afflict folders that are part of the solution itself, as opposed to projects inside the solution.
All replies (5)
Friday, September 25, 2015 2:22 PM ✅Answered
I found the problem.
I thought I had figured it out last night. I had created a new, blank solution outside the original solution folder, and started adding projects to it one by one. I added the main project ("MainProject"), the one where I first noticed this, first. I was able to open all of its folders and view all of the files inside them. So, the problem was clearly not endemic to the project or to VS 2015. It had to be something else.
I added another project. After doing so, I went back to the MainProject project and checked its folders. I was still able to view their files. So I closed the solution and saved it.
Then I reopened the solution and checked MainProject's folders again. All good. Then I added another project and checked MainProject again, saw all was well, and closed and saved the solution, and then reopened it and checked MainProject's folders again.
I kept doing that until all 33 projects were loaded into the solution—open, check, add project, check, close and save, reopen, check, add project, etc.. By the time I was done, I had almost recreated the solution; the only thing missing was the set of four folders at the solution level; otherwise it was exactly the same as the original, converted solution. I was still able to view the files inside MainProject's folders (and the folders in other projects as well). I tried closing and reopening the solution several times, and each time I was able to view all the files, so I was satisfied that I had a working solution.
I started scrutinizing the solution file in Notepad to see if there were any obvious differences between it and the converted one. There were three kinds of differences. First, the order of projects was different (no surprise). Second, the new one did not have the Setup project listed in the GlobalSection(SourceCodeControl) = preSolution section, even though it would show up in the IDE. (In the converted solution file, it does show up in the GlobalSection(SourceCodeControl) = preSolution section). Third, the solution folders were missing (since I had not added them).
I went to bed satisfied that I was on to the cause: It must be either the addition of the solution-level folders, or (more likely) the order of the solution-level folders in the solution file. My theory was that the problem would show up if the main elements of the solution were preceded by the solution-level folders rather than the other way around.
Confident that I had found the cause, I woke up this morning and loaded my new solution. I double-checked the MainProject project to make sure I could still see the files in its folders. But I could not. The problem had suddenly started afflicting the same solution that last night was working. There were the folders, but they would not show their files.
So my theory was wrong. It must be one of the references or components in one of the projects after all. Perhaps I had not seen it last night because the beast was loading in the background while I was checking the folders, and it had not finished before I concluded that all was well.
So this morning I started removing projects, one by one, and checking MainProject's folders afterward each time, then closing the solution and saving it, reopening it, removing another project, and so on. And I found that the Setup project is the culprit. When I removed the Setup project, I could see the files in all of MainProject's folders.
I was able to confirm this by removing the ISLE Setup project from my original, converted solution. Doing so cleared up the problem.
For the record, the Setup project is an InstallShield 2015 Limited Edition project, so the problem is being caused by a third-party component. When I originally converted the solution, I found that I had to download and install a new version of ISLE, modified for VS 2015, as VS 2015 would not load and could not convert the older one. Apparently the new one is not up to snuff.
d.j.lucas
Thursday, September 24, 2015 8:42 AM
Hi d,j,lucas,
Please confirm the files that you added are under the folder. Open the folder with right-click -> "Open Folder In File Explorer". If it is exist in the File Explorer, please select current project and click "Show All Files" on the right-top of Solution Explorer. And then you will see all files under the folder. Select the files with "Ctrl" and right-click to "Include In Project".
If there has no files in File Explorer, please check whether they are hidden. Select the "View" tab in top of File Explorer and select the "Hidden Items" as below image.
In addition, there may be something wrong when you convert this project, please create a new blank solution with Visual Studio 2015. Then add all files with Add Exist Item into every project.
Best Regards,
Weiwei
Thursday, September 24, 2015 2:11 PM
Weiwei,
Thank you for your reply. Unfortunately, it does not help. Show All Files does not work. The files exist in File Explorer, and they are not hidden.
Creating a new, replacement solution is what I'm trying to avoid. The solution has 33 projects and almost 1,000 files. Recreating the solution (assuming it would work) would take the better part of a day. It would be far superior if I could just find out what's wrong and fix it, especially since the only difference between this one and the previous one is that VS 2015 converted it.
d.j.lucas
Thursday, September 24, 2015 3:21 PM
For what it's worth, I did try creating a new solution and adding the existing projects to it. That too failed. Some of the projects would display files from some of their folders, but not most of them. And if I repeated the import process for one of these affected projects, the outcome would changeusually for the worse. Files that were visible the first time were no longer visible. So, creating a new solution and importing the existing projects is not a viable option.
d.j.lucas
Friday, September 25, 2015 10:34 AM
Hi d.j.lucas,
>>The files exist in File Explorer, and they are not hidden.
Please try to add them with "Add Existing Item…" in Visual Studio to check whether it can be added into the folder.
>>For what it's worth, I did try creating a new solution and adding the existing projects to it. That too failed.
Do you add the existing project which is not converted? Please add the items which is not converted in Visual Studio 2012 project.
>>I can see the files in source control
Do you using some version control tools to manage your code? If yes, please check the settings on your source control tools, whether there has some settings limit the file access.
In addition, please try clear the .suo file under the solution folder. The solution user options (.suo) file contains per-user solution options. Then clear and rebuild the solution again. Before you open the project, please try reset all settings with Tools -> Option -> Import and Export settings -> Reset All Settings.
If it still has the problem, please convert the project to Visual Studio 2013 (before convert, please install Update 4 for Visual Studio 2012), whether it has the same problem?
If no, please convert it to Visual Studio 2015. Because there are many changes between 2012 and 2015.
If yes, please try open this solution in another Visual Studio 2015 or could you please provide a simple project which has this problem and some screenshots to OneDriver and share the link here. We try open your project to find the problem.
Best Regards,
Weiwei