I'm trying out Visual Studio 14 CTP 2 and noticed there's this .sln.ide folder:
There have been a few questions going around about the .sln.ide (see this, this and this), but two of them are about a file (not folder) with that extension in Visual Studio 2012 (not 2014), and the remaining question is unanswered.
From the hints I've seen in those questions, it appears that the folder is created by the Roslyn compiler for caching purposes. However, I've been unable to find a source that explains exactly what it does.
So what is the purpose of that folder, and how is it used?
It
...is used by Roslyn Compiler engine to store temporary files.
See: http://blogs.msdn.com/b/webdev/archive/2014/06/03/announcing-web-features-in-visual-studio-14-ctp.aspx
As my inspect, Visual Studio 2015 RTM never use this folder again, you can delete it. If you had used .tfignore/.gitignore to ignore .sln.ide, you can delete it too. Cause it won't be generated anymore.
It now uses hidden .vs folder, with the same files in .vs\(solution name)\v14\vbcs.cache. Some of them have .vs\(solution name)\vbcs.cache, I believe it has been used in some preview versions of VS 2015, already been replaced by v14\vbcs.cache and can be deleted too. And also you can delete (solution name).v14.suo because it's been replaced by .vs\(solution name)\v14\.suo.
Related
I'm working on a Visual Studio solution using Visual Studio Professional 2017, the solution consists of four types of projects:
Several C++ projects
A C# project
Several C++ unit test projects
A C# unit test project
IntelliSense seems to be working for all, except for (at least) one of the C++ unit test projects, and it goes even further: for some tests inside that particular C++ unit test project, IntelliSense is working, but for some other, it isn't.
As mentioned in other Stackoverflow posts, I've already removed the *.cache files and there are no *.ncb files (so I can't remove them :-) ).
I also consulted the MSDN website, as proposed by Visual Studio:
Intellisense: 'No additional information available' (See 'Troubleshooting Intellisense in C++ Projects' for further help.)
I typed the mentioned sentence in MSDN search (learn.microsoft.com), and I got 229 results, which looked useless, and I got 0 results while searching for the exact phrase. :-(
Another approach : in my Visual Studio settings, I've maximised the messages, sent to the output window, I've rebuilt the whole solution, and afterwards I looked for the word IntelliSense in the output window. There was nothing. Then I typed something in order to launch IntelliSense, I verified the output window, but nothing was added.
In order to solve this problem, I need detailed information about IntelliSense itself:
I believe that IntelliSense is based on some files. Which ones?
I also believe that IntelliSense is keeping its own information in memory. Is this correct, is there a way to store this memory mapped information in files? If yes, which ones, and how can I force IntelliSense to refresh its information?
Whatever IntelliSense is doing (filling its information in memory, saving it in files, retrieving its information from those files, ...), what can I do in order to log those actions, so that I have an idea what might be going wrong?
In other words, does anybody have background information on the IntelliSense background task, which might explain what's going wrong, and how I can derive (from information in output window or other) what to do?
Thanks in advance
You can try resetting Visual Studio once
Devenv /ResetSettings
Sometimes Visual Studio has these gnawing bugs that just stresses you out for no reason.
Remove the hidden .vs folder from your solution. That would trigger index rebuilding.
Also you can try to install recent update for Visual Studio 2017, they seem to work actively on improving the indexing.
What is the .vs folder used for exactly? It gets created at the base folder of my solution. I can see some hidden files and different files appear for different projects. I'm having a hard time chasing up official documentation on it.
Even though there is no specific documentation, there was a similar question here
Usually, .vs folder is required by Visual Studio to store opened documents, breakpoints, and other information about state of your solution. which means It contains typical files like,
Temporary caches used by Roslyn for IntelliSense.
IIS Express applicationHost.config file.
Many other possible files (you are welcome to edit this answer to include what you know of).
While not a direct answer to this question, I thought I'd share that I recently had an issue in my ASP.Net Core website where routing appeared to be completely broken with no code changes. What's more, I tried deleting views/razor pages and it was still incorrectly loading an old view, presumably cached. But whenever I switched to the console launch setting, the issue went away.
I then recalled that in rare cases the .vs folder can sometimes cause IIS Express to become corrupt, so I closed VS, deleted the .vs folder, re-started and launched the website with the IIS setting and everything worked again.
Similarly to santos, this is not a direct answer to this question but I have found that deleting the .vs folder can sometimes get you out of trouble when all else fails!
See this question that I asked a year ago for an example of where deleting this folder fixed the problem of duplicate tests that were showing up for me in Visual studio
Visual Studio 2019 showing duplicate tests in Test Explorer
I find myself loading old C# solutions from VS2010 which have been upgraded to 2017. Thee appear to be a lot of baggage of folders and files coming along.
Is there a way to clean a solution that removes any unneeded files from old versions and only keeps what is being currently used? There may be old files that aren't even referenced any more in the solutions, but how do I know what is what?.
Basically when you attempt a conversion, generally Visual Studio creates a Backup directory to prevent the unintentional situations, as converted solutions or projects might be no longer compatible with Visual Studio versions that are earlier than current version of Visual Studio.
In Backup Folder, There should be an old version of your project.
If it works fine without original version of your project, you may delete whole "Backup" directory as you don't need them anymore.
If any project cannot be converted, it is unloaded and marked as unavailable in Solution Explorer. In this situation, address the problems indicated in the upgrade report as you try to reload the projects that are marked (unavailable), in this case, you may recover from your original project by open a project / solution file located in Backup folder.
Good luck with your project!
The way to clean is good old elbow grease so to speak. Simply remove a file from the project, or comment out a section of a file you think is not being used any more, rebuild. Put it back if build breaks or refactor it out rinse and repeat.
Of course with code files you can use Visual Studio's built in Find References to help as well.
A tool called Resharper can be used to deep cleaner faster, such as changing namespaces, renaming and finding all implementations but Visual Studio 2017 has all the renaming and reference finding you probably need.
Of course have all the code in source control, and incrementally commit every so often so you can revert a build you might break while removing files and not remember exactly everything you removed.
I got really weird problem. I am starting to learn MVC but my ASP.NET template seems to be incomplete and does not support MVC at all. It doesn't matter which version of .NET Framework I choose. Look:
What is more weird, my ASP.NET MVC 4 Template from previous version of visual studio works fine, without any issues (I can add views, controllers etc). BUT ONLY if I choose .NET Framework lower than 4.5.2.
What I already did:
I tried command: devenv /installvstemplates
I did repair installation of visual studio and its updates
I uninstalled all addons and extensions
What I do not want to do:
I dont want to clean reinstall Visual Studio
What I think I can do to fix this:
copy cache from someone and paste it to my \Common7\IDE, but I do not
have access to working cache files.
I would really appreciate your help guys.
/edit (I am sorry for my mistake with adding answer)
So I tried to fix it as i didn't receive any answer, I tried many things from google results, many pointing to this site but nothing worked.
I uninstalled visual studio, cleaned registry, used /uninstall /force with 2012, 2013 and all updates isos with no luck.
I tried this solution:
Can't create new MVC5 project or any other ASP .NET projects in Visual Studio 2013
but it didn't work either.
Does anyone has any idea? I will give you some reward if your answer help me.
I would really appreciate anything. Point me to some direction.
ONLY MVC 5 doesn't work, no templates are shown (in one asp.net
template) and if I download mvc 5 template from the web, or convert
my existing mvc 4 project to mvc 5 it stops showing "add controller,
add view options"
All MVC 4 projects and templates are working without any issues at all.
/edit 2
=== WORKAROUND ===
If someone tries to resolve this issue, basically I coudn't do it, but I found workaround which is ugly and simple:
Deleted every single extension AND every VS Update
Uninstalled Visual Studio
Uninstalled it again using /force method
Cleared its every trace and the registry traces I was able to found
Used TuneUp utilities to clear broken registry keys
Uninstalled SQL Server 2014
Uninstalled everything that was related to Visual Studio (Web Essentials, .Net Frameworks, Command Tools etc), check in Ccleaner,
it will be much faster.
Installed Visual Studio with Update 3 and... It was broken right after installation, missing files errors
I repaired the installation and everything seemed to work but... localization, language files didn't work, caused visual
studio to
show errors or simply hang.
I tried to reinstall language pack but I received error "this language is already installed". I couldn't uninstall it
either. I finally added language files manually:
in VS folder in Program Files searched for '1033' and 'en' folders
opened my acronis partition backup
added to every directory where one of the two folders was found, folder equivalents of my language '10xx' or 'xx'
WARNING: If you won't do it for EVERY folder, you will get assembly missing error, or your visual studio will have spikes (especially in .aspx files). Don't copy paste it all at once either cuz if you place localization files for assemblies, extensions you don't have, it will cause errors too.
TIP: If you don't have backup, simply take this files from someone else, they should generally work, no matter which update VS of the other person have.
Its unfortunate that no one had better answer for me but I do hope that this will at least help guys in similar situation.
Visual Studio autogenerates this file. Searching for info on it tells me to never edit this file. Fine, but do I need to store it in my VCS or can VS auto-regenerate it whenever needed?
I believe that Settings.Designer.cs and other similar files should be under version control.
I ran into problems using the advice of the other answer here on this question.
Settings.Designer.cs is only modified if changes are made to Settings.settings, and it is auto generated by Visual studio, but not by build tools.
When I removed Settings.Designer.cs I ran into issues where Visual Studio wasn't auto-generating the file when expected, and I had to do several rebuilds/reloads of my project until finally it randomly appeared, and I'm not sure what actually triggered it.
Also I was having issues on our TeamCity build server because the build tools there were not generating the file, so I had build failures saying it was unable to find Settings.Designer.cs
I found a good rule of thumb in this answer on another question, that basically if the build system modifies the file, then don't put it in source control, but if it is only modified when you make changes to another file and is generated by visual studio, then it probably should be in version control.
Also, Visual Studio 2017 can automatically create a Git repo with a .gitignore file when creating a new project, and by default all of the *.Designer.cs files are included in the Git repo.
The problem with adding these items to version control is, that different version of visual-studio, or perhaps other environments may generate these files in different ways. This sometimes leads to irritating conflicting errors on build servers ect.
VS can auto generate this file.
After reading this answer, I went ahead and deleted the Properties/Settings.Designer.cs but got an error when building the project that "the file was missing". My project still had the references to it. So it is important that you also remove the references from the Project.