Visual Studio 2013 Solution Explorer Not Showing Files - asp.net-mvc

I am trying to start a side-project to learn some MVC coding.
I am having some weird behaviour when I have reopened my MVC project.
The classes I created "Backpacker" and "Booking" are not showing up in the solution explorer. I have tried pressing the "Show all files" button, but this does not help.
As you can see in the screenshots, I have the class file open, and the path is pointing to the current project. Also you can see that my classes are in the same directory as the other classes that are visible in the models folder.
Does anyone have any ideas as to why this is happening? It is hugely frustrating and I feel like maybe I have not configured something correctly?
Thanks in advance
//EDIT//
Darn it - I tried the "Show all files" once more and this time it seemed to "almost" work... see the newest screenshot.
However Visual Studio is still obviously not connecting them to the project correctly.... does anyone know why? or how to fix/prevent this in future?
Cheers.

Alright so this problem was my own fault. I overlooked something I had done without realising what was actually happening.
When I added my new classes through solution explorer, that was all done fine. However When I closed visual studio and had the following prompt:
I clicked "no" because I usually work with XSLT which doesn't require saving the solution for my changes to be kept.
When you add references to new class files in your project, the project needs to be saved or you will lose this data (duhhh).
To fix this issue I did the following:
And then made sure I SAVED THE SOLUTION changes.
Thanks for your help - hopefully this may be of use to other people.

Related

Visual Studio won't show added files in the solution explorer

Why would VS2019 (with VisualGdb) refuse to show added files the solution explorer?
I found some workaround, i will post as an answer. But i'm still quite interested in the explanation of the underlying problem.
Additional info: opening the project file (.vcxproj) shows that the files are actually added to the project, only they are "invisible" in the project explorer.
I'm not sure, if this issue is VS-related or VisualGDB-related, or even layer-8-related, but hopefully this answer will help some people anyway.
So after trying many things not leading to success, i found this workaround:
In the project file (.vcxproj), i actually found entries for theses "invisible" files, and after deleting them and re-opening VS, i added these files again in the soluton explorer. Only this time, they correctly showed up in the solution explorer.
Weird: a compare tool showed not the slightest change in the project file, so there got to be some underlying issue.

VS 2019 Configuration Manager shows blank configurations

Below is the Xamarin Forms solution but I have witnessed the same in WPF solution too. App.iOS project has blank configurations.
What's worse, you are not able to Add New ones by scrolling down and pressing <New...> - It does nothing. If you try to <Edit...> and remove/rename the blank ones, you get an error "The operation could not be completed".
I would like to remove blank rows, and be able to add new configurations using the <New...> button.
What I've tried:
Cleaning and rebuilding project
Rebooting Visual studio and PC
Tempering with App.iOS.csproj file, no blank data in there, nothing looked wrong to me.
So maybe this will help you. I had the same issue on my solution today and found your post.
I tried messing around with the sln file manually without luck.
My solution:
Since my project was x86 only I ended up clicking the edit in the Active solutions platform: dropdown.
I removed the items x64 and Any CPU. Then I went to each project and checked if it still had those two entries. Some did and I removed them. To my surprise when I then clicked the dropdown for one of the projects that had blank entries they were gone and so was the ones for the second project that had the blank entries too. Hopefully this will work for you.

Can't open project: "One or more lines were too long and have been truncated"

I'm having some kind of problem with my project that me and my friend is working on. When I try to open the project that I've been working on it gives me an error message saying that "one or more lines were too long and have been truncated" and thus I can't see my code or GUI. When my friend opens the project on his computer (The project is on dropbox so it's the same file) there's no problem at all. I've googled but couldn't find anything. I just did a repair of RAD Studio but no luck. We have 2 forms and a unit that we use, the unit and the mainform isn't working for me but the second form is no problem.
Thanks!
Make a copy of your project directory.
Search your harddisk for XXXX.pas and XXXX.dfm
Hopefully there will be some temperary files that match - like "mylostform.dfm.~1307~" . copy the newest to your project directory, and rename them to "mylostform.dfm" and "mylostform.pas".
Kind regards,
Geir Bratlie
From the comments, you have Dropbox, and the Restore functionality is available, but using it would cost you a week's worth of work.
If I was in that situation, here's what I would do:
Copy the current file to somewhere else (My Documents, for example).
Use Dropbox Restore to get the old version that works.
Make a copy of this, because you're going to be modifying it
Ensure that you can open it in the IDE.
Use Beyond Compare to open the two files side-by-side. (If you don't have this, you really should!)
If they're completely different from each other, you have a serious problem. If not, you'll see the changes you've made. Start copying changes one at a time, and after each change, save and try to open it in the IDE.
At some point, you won't be able to. That's where your problem lies. Now you can fix it!

Not able to open files in visual studio after debugging application

I'm working on an ASP.net mvc project in Visual Studio 2012. Came across this issue, which is incredibly annoying when debugging my application. Say that I have n number of files open in my editor whenever I build and start a debug-session using F5. Ok, so the editor closes all the open documents as usual, and I do my debuggig tasks. Now; when I stop debugging and want to re-open the files that I had open earlier, I'm not allowed to do so. Nothing whatsoever happens when I click these files, until I restart VS2012.
If I close all of my open documents before debugging, opening them after works fine and the way it's supposed to. Also, this is the case for all of my new or existing projects. I run with ReSharper 7.1.2 installed.
Has anyone encountered this issue before?
To stop ALL files from being closed after debugging simply go to
Tools > Import and Export Settings > Reset Settings
This will fix this bug, I have the old settings saved that caused this error but I am unsure what specifically causes it within the settings. After frustratingly searching around for a clear answer to this problem I hope this helps others that might have this issue.
Note, I also had your error in my instance of VS 2012 but had neither of your extensions. I would propose that uninstalling your extension removed the setting causing the error.
Did you tried cleaning the solution?
Go to Build then click Clean solution
After a bit of trial and error, I found that AnkhSVN was causing the problem.
Whenever I tried to check in (or out) the code, it caused some exception.
I have no clue, why this prohibited me from opening files after debug but it works after removing AnkhSVN.
I've got this issue as well. I wasn't able to solve it. In my case, the file was open but it was invisible. After debugging again with the file still open but "invisible" I got an error that the file doesn't exist when I navigated to the page (I faced this issue while working on an ASP.NET project).
I recommend reinstalling VS, in case you've messed with all the debugging and window settings.

Visual Studio 2010 ASP.NET MVC: Create Strongly Typed View Not Showing My Classes

For some reason, when I create a new view and select 'Create Strongly Typed View', when I try to select a view data class from my project I find that its not in the list?
Classes from all my project's references (external references) are there, but NONE of mine?
I know this can be done manually, but (bloody) visual studio wont allow me to select a page template unless a view data class has been selected. Im sure this is something I have forgetten or changed somewhere by mistake. Hope someone can help!
This is probably a stupid suggestion, but the only time this has happened to me has been when I've created a new ViewModel and tried to create a strongly typed view without building the project first.
I had this exact same issue, could not find the solution anywhere, and i really searched google, read many sites answers/suggestions, but nothing helped me, until i did this below.
Ok, you may have already figured out the answer by now, or even tried what i am about to suggest, but, save project, build project, just to be sure, then close project, then close vs altogether, then RUN VS AS ADMINISTRATOR, then open your project and add view, i bet you can now see the data classes in the View data class drop-down...!
Let me know if this worked for you.
//edit: just fyi, I don't think you would see this behavior in say Windows XP for instance, it must be due to the uac in Vista and 7, so I am assuming you are using one of these two. In my case i am using 7. I may have gotten this totally wrong, pardon me if i did, but it solved this issue for me, thanks.
//another edit: In fact, i think many problems with vs and sqlsrvr are related to permissions in vista and 7... just my thoughts.
Jimbo - again 'stupid suggestion'. but are you checking for the fully qualified name of the project.classname?? So if you're looking for 'Albums' in the class list from the 'zulu' project, you'd have to scroll down to 'zulu.Albums'...
just a thought
I need to close this question as the problem is gone now - the solution?
Install Visual Studio 2010 - sorted :)
If anyone does find out why this happens, please just drop me a comment here and I will re-open the question for a successful answer.
I had similar issue. I try all the suggestions but installing Visual studio seems big process,
Why not try rebuild the solution , then it show all the classes in the project ..Hope it definitely works

Resources