samizzo / nshader Goto Github PK
View Code? Open in Web Editor NEWVisual Studio 2013/2015/2017 syntax highlighting extension for shader languages
License: Microsoft Public License
Visual Studio 2013/2015/2017 syntax highlighting extension for shader languages
License: Microsoft Public License
Split off from issue #12:
"I just installed NShader in 2017 and had the same problem as Xirema. I got it to work by disabling NShader, restarting Visual Studio, re-enabling Visual Studio and then restarting again."
Not a big issue, but readme doesn't include Unreal Engine 4 support.
Unreal Engine 4 syntax highlighter - .usf
I really appreciate the work done on this, but it would be great to be able to download it from the "Extensions and Updates" window within Visual Studio.
Any chance of that happening?
I have two shader files with extensions .fs
and .vs
. I have put // shadertype=glsl
as the first line of the two files but there's no syntax highlighting. Changing the extensions to .frag
and .vert
works.
Running VS2015 Community.
These are the relevant lines from the Log:
<entry>
<record>470</record>
<time>2017/03/20 09:33:29.121</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [NShader]</description>
<guid>{DD9B8CDE-96A0-4442-BF6F-083A7F43D453}</guid>
</entry>
<entry>
<record>471</record>
<time>2017/03/20 09:33:29.136</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [NShader]Source: 'mscorlib' Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
 at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
 at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
 at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)
 at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
</description>
<guid>{DD9B8CDE-96A0-4442-BF6F-083A7F43D453}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo></errorinfo>
</entry>
Version 2.1 works fine though, so I guess something broke when you added VS2017 support.
I have Visual Studio 2015 (with Nsight) and Visual Studio 2017. NShader just working on Visual Studio 2017. When using Visual Studio 2015 (with Nsight) to open the GLSL file, it’s just a normal text editor.
But on my other computer only Visual Studio 2015 (with Nsight), NShader can work.
Been trying to get this to work in VS2015 for hours now and can't seem to. Says its already installed, but it isn't.
Hi, Sam -
I've grown very accustomed to having this add-in as part of my VS environment. I'd be heartbroken if I had to leave it behind as I migrate to VS2017...
Signed:
A concerned fan.
... is not what this is. I just wanted to thank you for maintaining this! Strangely enough it was a bit hard to find though, I think you should recommend it in some different forums and perhaps get the word out.
I only ever found the original NShader which doesn't work for 2013/2015.
Thank you again!
I've been reading the previous issues and trying every solution, including disabling all the other extensions and reinstalling VS2017 Community (15.3.5). The issue is that no highlighting ever appears on my shader files, and there is no nShader section under Options although "Shader Language" does appear under the Text Editor section. Enabling, disabling, and reinstalling the extension doesn't seem to do anything either, except that with the extension enabled I get no highlighting at all and with it disabled I get the basic highlighting. Opening the file through a solution, manually, or creating a new shader file results in the same thing.
The extension appears in About section, and there are no errors. Going through the activity log and searching for "nShader" yields zero results. Don't really know where to go from there.
The title is self-explanatory.
Just installed the latest release (2.4) of this ext to the VS 2015 - and there's no syntax highlighting at all. More importantly, no way to specify it manually because there are no "NShader – Type" settings under Tools > Options > Environment > Fonts and Colors.
Tried uninstalling and re-instaloing the ext, also tried version prior to VS 2017 support (2.1) - the same thing.
Hi, Sam -
Bad news, I'm afraid. While the new version does appear to have installed in VS2017, none of the 'fonts and colors' entries (e.g., 'NShader - Comment') appear in the options dialog. The add-in DOES seem to have installed - it appears in the 'Extensions and Updates' dialog as an installed Add-in.
And here's a possible clue - when I ran the installer, two VS versions appeared in the list as available to have the add-in installed - VS2015 Pro and VS2017 Pro. I unchecked VS2015 (as the previous rev was already installed there), and checked the VS2017 checkbox, and started the install. Installer reported success on finish. I then opened VS2015, and after it had finished initializing, opened VS2017. Here's the thing - VS2015 displayed the sequence of dialogs at start-up you typically see when an add-in is installed - you know, 'scanning mef components', 'building mef components graph', or something like that. VS2017 showed no such dialog sequence at start-up - it made no indication that an add-in had been installed.
Again - I hadn't select VS2015, but had selected VS2017.
I hope this is useful info.
I tried running the latest version (2.4) using the VSIX Installer, and got this error. I am using VisualStudio 2017 Community.
Install log:
3/9/2018 2:59:07 PM - Microsoft VSIX Installer
3/9/2018 2:59:07 PM - -------------------------------------------
3/9/2018 2:59:07 PM - vsixinstaller.exe version:
3/9/2018 2:59:07 PM - 15.6.152+ge95e4dd1ce
3/9/2018 2:59:07 PM - -------------------------------------------
3/9/2018 2:59:07 PM - Command line parameters:
3/9/2018 2:59:07 PM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\johna\Downloads\NShader.vsix
3/9/2018 2:59:07 PM - -------------------------------------------
3/9/2018 2:59:07 PM - Microsoft VSIX Installer
3/9/2018 2:59:07 PM - -------------------------------------------
3/9/2018 2:59:07 PM - Found setup instance e26cb0d0 but not in launchable state.
3/9/2018 2:59:07 PM - Initializing Install...
3/9/2018 2:59:07 PM - Extension Details...
3/9/2018 2:59:07 PM - Identifier : NShader.51a01e9d-eb56-4ee2-a9fd-8212bf6bf2b1
3/9/2018 2:59:07 PM - Name : NShader
3/9/2018 2:59:07 PM - Author : Alexandre Mutel
3/9/2018 2:59:07 PM - Version : 2.4
3/9/2018 2:59:07 PM - Description : NShader is an extension to Visual Studio that provides syntax highlighting for various shader languages including HLSL - GLSL - CG
3/9/2018 2:59:07 PM - Locale : en-US
3/9/2018 2:59:07 PM - MoreInfoURL : https://github.com/samizzo/nshader
3/9/2018 2:59:07 PM - InstalledByMSI : False
3/9/2018 2:59:07 PM - SupportedFrameworkVersionRange : [4.5,)
3/9/2018 2:59:07 PM -
3/9/2018 2:59:07 PM - SignatureState : Unsigned
3/9/2018 2:59:07 PM - Supported Products :
3/9/2018 2:59:07 PM - Microsoft.VisualStudio.Pro
3/9/2018 2:59:07 PM - Version : [12.0,15.0]
3/9/2018 2:59:07 PM - Microsoft.VisualStudio.Enterprise
3/9/2018 2:59:07 PM - Version : [12.0,15.0]
3/9/2018 2:59:07 PM - Microsoft.VisualStudio.Ultimate
3/9/2018 2:59:07 PM - Version : [12.0,15.0]
3/9/2018 2:59:07 PM - Microsoft.VisualStudio.Premium
3/9/2018 2:59:07 PM - Version : [12.0,15.0]
3/9/2018 2:59:07 PM -
3/9/2018 2:59:07 PM - References :
3/9/2018 2:59:07 PM - -------------------------------------------------------
3/9/2018 2:59:07 PM - Identifier : Microsoft.VisualStudio.MPF.12.0
3/9/2018 2:59:07 PM - Name : Visual Studio MPF 12.0
3/9/2018 2:59:07 PM - Version : [12.0]
3/9/2018 2:59:07 PM - MoreInfoURL :
3/9/2018 2:59:07 PM - Nested : No
3/9/2018 2:59:07 PM -
3/9/2018 2:59:07 PM - Prerequisites :
3/9/2018 2:59:07 PM - -------------------------------------------------------
3/9/2018 2:59:07 PM - Identifier : Microsoft.VisualStudio.Component.CoreEditor
3/9/2018 2:59:07 PM - Name : Visual Studio core editor
3/9/2018 2:59:07 PM - Version : [15.0.26208.0,16.0)
3/9/2018 2:59:07 PM -
3/9/2018 2:59:07 PM - Signature Details...
3/9/2018 2:59:07 PM - Extension is not signed.
3/9/2018 2:59:07 PM -
3/9/2018 2:59:07 PM - Searching for applicable products...
3/9/2018 2:59:07 PM - Found installed product - Global Location
3/9/2018 2:59:07 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean isRepairSupported, IEnumerable1& skuData) at VSIXInstaller.App.Initialize(Boolean isRepairSupported) at VSIXInstaller.App.Initialize() at System.Threading.Tasks.Task
1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
While GLSL does not mandate any extension for shader sources, the reference compiler expects the following mapping :
.vert - a vertex shader
.tesc - a tessellation control shader
.tese - a tessellation evaluation shader
.geom - a geometry shader
.frag - a fragment shader
.comp - a compute shader
NShader should support all those extensions as it's the closest thing to a standard.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.