سؤال

I have been working with VS10 for years and yesterday I have installed VS12 side-by-side with the old one. Now I noticed that some file associations are inconsistent. Projects are opened by the version selector, C++ files by VS10 and FSX files with VS12 and more of this mess is around. Everything is a bit random and I wanted to map everything to VS12 while still having VS10 installed as I use XNA and you know that VS12 has no official support for XNA yet.

Searching SO revealed I only have to go to Options > General > Restore File Associations, but it is called now Manage File Associations and the control panel is being opened and lets me choose for every available format of VS which one I want:

Control Panel File Associations

I could select the check box to select all available formats but... I dislike this idea, because it could probably break something.

Has anyone good advice whether my doubts are wrong - yet how should I manage the associations without breaking anything?

هل كانت مفيدة؟

المحلول

That is a pretty fundamental limitation in the way file associations work in Windows. It works well when you click a solution or project file. They are associated with a little utility named VSLauncher.exe. Which looks in the file for the format version and thus knows which version of VS to start.

That same trick doesn't work for a source code file, like a .cpp or .cs file. There isn't enough information in the file to reliably pick a VS version. It is just code, most of which will compile properly on any recent VS version. So it is just associated with whatever version of VS you installed last.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top