I installed Visual Studio. Then I installed Notepad++ and somehow all my Visual Studio-related files have the icon changed and also the association changed to some Code Writer application, which is an application in Windows 10 tiles.

I removed this application. I ran "repair" on Visual Studio. But the original Visual Studio studio icons have not returned.

Is there a way to do it or I have to uninstall and install again Visual Studio?

  • @FrankThomas there, OP has quite different situation. There OP talks of file association to a different application. Association is easy to fix. In my case, I also lost easily-recognizable icons. In fact, in that question, icons would also change but both VSs simly have same icons, that hides the problem. – T.S. Nov 28 '17 at 6:43

You need to use App defaults in settings or control panel, find visual studio and then set it to use all defaults or selective mark those you want. I would go the latter route just to make sure you don’t mess up another app.

How to set application defaults in Windows 10

  1. Right click the start menu, select Settings
  2. In the settings home page, click on Apps
  3. In the Default Apps on the left
  4. At the bottom of the page, click on Set defaults by app
  5. Find Microsoft Visual Studio and click on it to reveal the Manage button which you should click on
  6. Set each association as appropriate.

Under Visual Studio 2015, I have all associations as Visual Studio, with the exception:

  • .androidproj, .csproj, .jsproj, .lsxtproj, .vbjproj, .vcproj, .vcxitems, .vcxproj which uses Microsoft Visual Studio Verson Selector
  • .js which uses Microsoft Windows Based Script Host
  • GIT-CLIENT (URL:git-client) which uses Microsoft Visual Studio Web Protocol Handler Selector
  • .bsc, .datasource, .dds, .exp, .fbx, .idb, .ilk, .lib, .ncb, .obj, .pal, .pch, .pdb, .props, .resw, .resx, .sbr, .settings, .snk, .user, .vsp, .vspf, .vsprops, .vsps, .vspscc, .vssettings, .vssscc, .vsz, .xsc, .xss which are not set

How to change default icon of file type

This requires you have administrative access.

  1. Run regedit.exe
  2. Under HKEY_CLASSES_ROOT locate the extension, eg, for .png use HKEY_CLASSES_ROOT\.png
  3. The default value will be the associated key that holds the file icon, eg, HKEY_CLASSES_ROOT\.png\(Default) has the value pngfile, then lookup HKEY_CLASSES_ROOT\pngfile\DefaultIcon\(Default)

Note that the value of the DefaultIcon default will be a path to a file, a comma and the icon index in the file. See MSDN's article, How to Assign a Custom Icon to a File Type for confirmation.

If you are afraid to do this manually, there are File Type Icon managers out there that would do this on your behalf but I can't personally recommend any as I don't use them. Online-Tech-Tips.com has a page enitled How to Change the File Type Icon in Windows 10 that suggests a few.

If anything, I would run a repair on Visual Studio so that it re-associates itself with the icons it should have.

|improve this answer|||||
  • Can you elaborate. Go there, click this... This is windows 10. Thank you – T.S. Nov 28 '17 at 14:34
  • Updated my answer with the steps – netniV Nov 28 '17 at 14:52
  • I used your tip to find this cnet.com/how-to/how-to-set-default-programs-in-windows-10. Also, I looked into your suggestion but this is not solving my issue. In fact, it can make it worse. If I go to .css type and assign Visual studio, the icon will change to VS icon. Same as if I do this in file properties. If I go to manage by app, css is not even there under visual studio. And this code writer app, somehow reinstalled itself. Bottom line, my problem that is VS-specific icons gone- is not fixable this way. I will try to reinstall vs in few days – T.S. Nov 28 '17 at 15:37
  • OK, I've added some extra bits about that. If assigning Visual Studio to the file type isn't changing the icon when you set the file association (unusual) then you can use the above method to manually set the icons. – netniV Nov 28 '17 at 15:51
  • I already started playing with registry. And I will look at what you have there. For this: If assigning Visual Studio to the file type isn't changing the icon... -- again, it does. Only it sets VS icon instead of CS or VB icon. That is not good enough. – T.S. Nov 28 '17 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.