I have vs 2010 and I’ve installed this plugin. But even after changing the .pkgdef file like you said I get either a freeze or an empty blue square when trying to open .shader files. Do you have any idea what the problem might be?
Coincidentally, homeros, I went looking for the exact same solution and wound up here too, only to run into the same crash you did. The fix is that IJM’s solution no longer works with the latest NShader 1.3 version - but works perfectly with the older 1.2 version. Grab it here and apply the above addition to the .pkgdef file and you’ll have .shader code highlighting working perfectly:
Hi guys here is the solution if you are using the NShader 1.3
Close your VS2012 (or VS2010)
Edit the NShader.pkgdef located in YOUR_DRIVE:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\a_cryptic_subfolder (search for it in extensions directory). 10.0 for VS2010 version.
Add the following line to NShader.pkgdef (where other extensions are):
[RootKey\Languages\File Extensions.shader]
@=“{4c554917-0eb7-3742-9f6b-f2f529fc6729}”
4) Then to be sure that everything is going to be highlighted correctly, open a registry and remove the following registry (be careful!):
Deleted the key:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\FontAndColors\Cache.
And then added the following:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config\Languages\File Extensions.compute]
@=“{4c554917-0eb7-3742-9f6b-f2f529fc6729}”
Still no luck after restarting VS 2013, still no color coding - Any suggestions would be appreciated.
Do I need to delete this key?
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ 12.0_Config
(To scared to try it out - as i didn’t see anything about doing this regarding installing NShader in VS 2013. - Please note this is the 12.0_Config NOT the 11.0_Config).
Ok. Here’s small update: http://www.jostavo.net/NShader.rar (it’s a new fork for 2013 by SilentSouls that uses embedded coloring, the one Nims mentioned before)
I’ve added support of .shader, .compute, .cginc (sorry just handling not native support, see attach)
optional - in VisualStudio go Tools > Extensions and Updates find NShader and uninstall it, reboot studio (it need to be restarted to remove files)
Make sure Visual Studio is closed
Who afraid to download my file, install one from jostavo.net and then create and add .reg:
For future updates: {af99cc5c-2a8a-3547-b255-896525bc39d1} - is UUID for current build only!
To find one You needed - open NShader.pkgdef and look for: