Visual studio 2010 stuck - visual-studio-2010

I've opened a XAML file in VS2010 that crashes Visual Studio.
The problem is that when I close VS and reload it again the XAML file automatically opens and crashes my VS again.
I don't know how to solve this loop.
Is there a way to open the solution with all files closed?

You could delete your solution's '*.suo' file. This file contain the information about the open editors. If you delete it visual Studio will not open any editor when loading the solution.
However you might lose some other customizations as well but in general there is nothing really important in this file and Visual studio will automatically create a new .suo file

I will try even a more violent method.
Move it into trash, and then bring up Visual Studio 2010.
Open another file in Visual Studio so your XAML file opening record will be washed out by the new one.
Close Visual Studio, and then restore your XAML file.
I'm pretty sure that Microsoft's file system won't track where your XAML file go and then tell Visual Studio to open it in the new location, but putting it in trash temporally is a great option.

Try temporarily move the xaml file to another location. (or rename) so VS cant find it, then you should be able to open.

Related

Project scripts not saved in the Visual Studio list

When I edit the Unity scripts, it opens up visual studio for me, and I manage the code there. Each script opened in visual studio has an x ​​next to its name, so you can remove it from view.
When I don't press the x and leave the script open in visual studio, if I close visual studio and open another script from Unity, the last script selected is shown, and alongside the previous script that I had not deleted with the x (it shows me the previous scripts that I had opened and had not removed).
What I just said happens with 6 of my projects.
The seventh however (not in order), does not behave like this. When I open a script and, without deleting it (from view, not from Unity), I close visual studio, the next time I reopen, the recent scripts are not displayed. I would like them to be displayed.
This is because I have about thirty scripts in the project, and managing the openings from visual studio is much faster than doing it from Unity, as first you have to search for the exact path of the script, and then you must also wait for it to load.
I searched for solutions and tried looking at visual-studio / unity settings, but didn't understand what may be causing this.
I have done the "Reimport All"
I have regenerated the project files
I have reinstalled Unity and Visual Studio Community 2019 from the Unity Hub
There's a .sln file, which references .csproj files, which contain the files within your project. These files are those listed in your solution explorer. These files are generated by Unity and are related to Project files. In Visual Studio in the Solution Explorer, you will see the Solution (.sln file) which contains one or more projects (.csproj), and the files within a project.
Now besides of that, Visual Studio has a lot of settings besides the actual solution and project. These settings are for instance:
How you arrange your view in VisualStudio
Which tabs are opened (Your question refers to the file tabs)
These settings are stored within a .suo file. These .suo files are located within a hidden directory .vs inside your project folder (next to the .sln file). Usually the .suo files and the .vs folder are part of the .gitignore list so they don't get added to the repository, because they are machine specific settings. E.g. you want your VisualStudio to be set up differently than that of another developer in your project.
I think you need to make sure that your .suo files don't get overwritten/changed by any other mechanism. For instance, if the .suo file is added to a git repository, another developer closes all the tabs, and pushes it's .suo file, and you pull that. Then after you reopen Visual Studio all the tabs will be closed. If you open 5 tabs, and push your .suo file, and the other developer pulls it, next time that developer opens VS the 5 tabs will be opened.
You can also try to delete the .vs folder to reset everything. Don't forget to make a backup though.

Where does Visual Studio store the watch window data?

I use to have some complex expressions in the watch window and out of a sudden the watch window is completely empty now. Of course I can put the expressions back manually but it would be really interesting to know where Visual Studio stores the watch window data? I doubt that it's stored in some solution related file since after a clean build the watches are still there.
I am using Visual Studio 2013 on Windows 10.
Watch window information is stored in the .suo file for the solution. I couldnt find it in any of the official documentation for, but the breakpoints are there and if you configure the watch window, then close VS, then delete the .suo file and open VS the watch window is empty. After closing VS, restoring the .suo file and opening VS again the watch window configuration is back. This is confirmed for instance by this blog post:
What informations are saved in my .suo file
This file is used by Visual Studio to store user/solution specific
information such as Opened Files, Expanded Nodes in the Solution
Visual Studio .suo fileExplorer, Opened Tool Windows and its
Positions, User Tasks, Breakpoints, Start-up Project, Contents of
Watch window, Whether the project is loaded/unloaded etc. The same
file is used by Visual Studio Addins (VSPackages) to persist
information that are specific to that solution/user.
I don't know where your .suo file went though, did you accidentally delete it?

How to enable open XML Package Editor power tool for Visual Studio

I want to create customized ribbon on my excel sheet. I saw some of the tutorial (e.g, http://www.youtube.com/watch?v=hn3Qkp4Jw34) where they used Open XML package editor power tool for visual studio 2010 and worked on some xml configuration file to add ribbon. Hence I downloaded the tool and installed it. But when I drag and drop the excel file to the VS-2010, the file instead of opening in the VS editor it is opening in its new excel window. I tried to do same thing for a word file but still it is opening in new word window instead of opening in VS editor. Anybody could you please help me regarding this. I was using Visual Studio 2012 but then I came to know that Open XML package editor power tool for visual studio 2010 won't work for VS-2012 hence Installed VS-2010 but still getting same problem.
Thank you
Anup, Have you tried going to File->Open from Visual Studio?
If that opens it from an Office client application as well, then the Visual Studio Package Editor is not the default option for opening documents of that file extension.
If the document is a part of a solution (you can just create a new blank solution and add it in) you can right click on the file from Solution Explorer and choose "Open With", from there you can choose to open that file as a "Package File", and you can also select this as the default way to "open" files of that extension in Visual Studio.
I work for Microsoft and have just updated this plugin to work with VS2012 and 2013. Drag and drop should work in all the VS versions (I just tested it) but perhaps it's worth trying downloading the updated extension from the Gallery and seeing if it works for you in the newer VS version.

vsix opens visual studio

I seem to have got my system into a bit of a pickle with respect to Visual Studio extensions.
Normally I would use Nuget.
When an extension is not on Nuget, I'd download the vsix file and double-click on it to start the installation process. But now, when I double-click on the vsix file, it opens it in the Visual Studio text editor, treating it as a file to be edited, rather than executing it as a file to be executed.
Anyone know how I can restore the correct, intended behaviour?
Thanks
First way: if you open regedit and see keys under HKEY_CURRENT_USER\Software\Classes.vsix, just delete that entire key. That should allow the global registrations in HKLM to take effect again.
Otherwise, right click on the file, Open With, and choose "C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe".

How to reload a property sheet in Visual Studio 2010

Is there a way to reload a property sheet that was edited outside of Visual Studio? Visual Studio doesn't detected automatically that the file was modified (like it does with project files). The only way I've found so far is to close and reopen the whole solution (but that's no good way).
Only a partial solution perhaps for your (and my) needs, but I've found it helpful to touch the .sln file. This causes Visual Studio to wig out and ask if you want to reload all the projects. Select "Yes" and then you'll notice the properties have refreshed. I make sure that my scripts which update property files also touch any related solution file(s).
Also see Is there any way to get Visual Studio to reload all projects when the .proj files have changed?

Resources