Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NShader not working initially in VS2017 #13

Open
samizzo opened this issue Mar 21, 2017 · 32 comments
Open

NShader not working initially in VS2017 #13

samizzo opened this issue Mar 21, 2017 · 32 comments
Assignees

Comments

@samizzo
Copy link
Owner

samizzo commented Mar 21, 2017

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."

@GabrielMajeri
Copy link

Hello, I am also suffering this issue and am unable to get NShader to work on VS2017. It worked well for a while, then it suddenly stopped working. I tried the workaround Xirema suggested and it still doesn't work.

I've followed these instructions to get the activity log, and I found this relevant part of it:

<entry>
    <record>402</record>
    <time>2017/04/02 04:14:53.577</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Unexpected system error mode before loading package [NShader]</description>
    <guid>{DD9B8CDE-96A0-4442-BF6F-083A7F43D453}</guid>
  </entry>
  <entry>
    <record>403</record>
    <time>2017/04/02 04:14:53.577</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [NShader]</description>
    <guid>{DD9B8CDE-96A0-4442-BF6F-083A7F43D453}</guid>
  </entry>
  <entry>
    <record>404</record>
    <time>2017/04/02 04:14:53.593</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>End package load [NShader]</description>
    <guid>{DD9B8CDE-96A0-4442-BF6F-083A7F43D453}</guid>
  </entry>

(this is the only part of the ActivityLog.xml file that contains any reference to NShader)

I am using the latest version of Visual Studio 2017 (26228.10) on Windows 10 x64. I tried reinstalling a few times and it still doesn't work.

@samizzo
Copy link
Owner Author

samizzo commented Apr 2, 2017 via email

@GabrielMajeri
Copy link

Yes, I installed it, used it for a run or two, and then I opened a GLSL shader and noticed it wasn't working.

I didn't have any previous versions installed.

@samizzo samizzo self-assigned this Apr 6, 2017
@GabrielMajeri
Copy link

I've installed the new release and it's fixed. Thanks!

@samizzo
Copy link
Owner Author

samizzo commented Apr 10, 2017

Oh thanks! I hadn't yet looked at this bug and wasn't sure if this would be fixed with the release. I'll do some more testing before I close this though.

@ShenyaoKe
Copy link

It works for me too after installing the new release of VS2017

@samizzo
Copy link
Owner Author

samizzo commented Apr 11, 2017

Great thanks!

@naqaden
Copy link

naqaden commented Apr 20, 2017

After installing only the newest version of NShader (v2.4), I also had this issue. I tested NShader while my previous shader extension (HLSL Tools) was disabled. To get NShader working for me, I had to fully uninstall HLSL.

@samizzo
Copy link
Owner Author

samizzo commented Apr 20, 2017 via email

@naqaden
Copy link

naqaden commented Apr 21, 2017

No problem. I started with only HLSL Tools, then disabled it before installing NShader. I never tried both enabled together.

@Rendman
Copy link

Rendman commented Apr 21, 2017

Same issue, installed fresh, syntax highlighting does not work.

@samizzo
Copy link
Owner Author

samizzo commented Apr 21, 2017

Did you get any error messages? Does it show up in Help->About?

What was the extension of the file you opened? How did you open it - via File->Open, or solution explorer, or drag/drop into VS, or some other means?

@Rendman
Copy link

Rendman commented Apr 21, 2017

No error messages. It does show up as ver 2.4 in Help-About. Extension is .vert (shader.vert), opened via solution explorer and was added by first creating a text file, then naming it shader.vert.

@krupitskas
Copy link

+1 here, vs2017. .vert and .frag not highlightning

@PazerOP
Copy link

PazerOP commented May 14, 2017

+1

Hopefully there's no personal data in here.
ActivityLog.zip

@samizzo
Copy link
Owner Author

samizzo commented May 22, 2017

Thanks for the info. In the mean time why don't you try Hlsl Tools. It has a lot more features than NShader. Honestly I'm not sure I'm even interested in continuing to support NShader now that Hlsl Tools exists.

@PazerOP
Copy link

PazerOP commented May 22, 2017

Unfortunately I'm working with GLSL, so I chose to edit my shader files in VS Code with this extension: https://marketplace.visualstudio.com/items?itemName=slevesque.shader

@krupitskas
Copy link

krupitskas commented May 22, 2017

Also GLSL user here
I'm working with Vulkan, so all my code in glsl

@samizzo
Copy link
Owner Author

samizzo commented May 22, 2017

You should be able to use Hlsl Tools with GLSL files. You can add extra file extensions for it to parse via Tools->Options->Text Editor->File Extension. Although it will complain about various GLSL types that it doesn't know about.

@Swyter
Copy link

Swyter commented May 26, 2017

I got it to work after disabling the SPIRV-VSExtension by Sascha Willems. Seems like they were conflicting.

@ssteinberg
Copy link

Had the same problem.
I decided to just take Samizzo's advice and adapt HLSL Tools to GLSL. I made a fork and quickly replaced HLSL's types and functions with GLSL ones (all 4.5 functions with parameters and documentations). It is far from a decent job, but it works. Will be maintained depending on available time.
https://github.com/ssteinberg/HlslTools

Anyway, thanks to Samizzo for keeping NShader alive, and Tim Jones for HLSL Tools.

@samizzo
Copy link
Owner Author

samizzo commented May 29, 2017

Thanks for letting us know about that! The NShader code base is quite old and dates back to VS 2008, and the Visual Studio extension SDK has changed over the years, so I guess that's why we've been having problems. I'll continue to tinker when I have time (working hard to release our game at the moment though!).

@realvictorprm
Copy link

@ssteinberg what about creating a seperate repo so we can maintain this 😃?

@ssteinberg
Copy link

Unlinked from HlslTools and renamed.
If anyone has the time to maintain, please let me know.

https://github.com/ssteinberg/GlslTools

@realvictorprm
Copy link

Thanks @ssteinberg. Yeah definitely needs maintenance

@realvictorprm
Copy link

Can you enable that issues can be opened?

@ssteinberg
Copy link

Done

@samizzo
Copy link
Owner Author

samizzo commented Jul 29, 2017

That's great, thanks for doing that!

@Alan-FGR
Copy link

Alan-FGR commented Aug 2, 2017

Hey guys, I had this problem with the latest release, vanilla install. No biggie though.

@Markyparky56
Copy link

Would like to reiterate what @Swyter said, SPIRV-VSExtension seems to be conflicting/blocking NShader from kicking in.

@Alan-FGR
Copy link

Alan-FGR commented Aug 7, 2017

@Markyparky56 I don't have that extension and still had the problem described here though.

@noemu
Copy link

noemu commented Nov 22, 2017

I've got a conflict with the "Visual Studio 2017 Tools for Unity" Version: 3.1.0.0.

Deactivated it and NShader work again. (Can't say if Unity Extension is a part of vanilla VS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests