Skip to content
New issue

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

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

Already on GitHub? # to your account

Stopped working after updates #55

Closed
Keith99 opened this issue Apr 21, 2020 · 6 comments
Closed

Stopped working after updates #55

Keith99 opened this issue Apr 21, 2020 · 6 comments

Comments

@Keith99
Copy link

Keith99 commented Apr 21, 2020

Installed product versions

  • Visual Studio: 2019 version 16.5.4
  • This extension: 0.7.96

Description

After updating visual studio to 16.5.4 and then updating the GLSL extension to 0.7.96 the extension fails to work

Steps to recreate

  1. Install Visual Studio Updaye
  2. Install GLSL Update

Current behavior

It is not working, i.e. no highlighting, suggestions or anything.

Expected behavior

I have used the extension for a long time without issues until now.

Let me know if I can gather any log info to help track this down?

@danielscherzer
Copy link
Owner

I also did the update. Still works for me. Just in case I did a recompile and pushed a new version. Maybe this helps...

@Keith99
Copy link
Author

Keith99 commented Apr 22, 2020

Hi, thanks for trying but no change here. It is likely something local to my setup but really annoying as I do lots of GLSL coding and the extension is brilliant :)

I donwloaded the source to see if I could debug it to find the issue. I have never done extension programming (although I know a bit of c#) so a lot is not familiar to me but I used the debugger to step through. I found an exception happened on line 21 of FileExtensionsOption.cs when adding a file extension of ext = ".glsl" and contentType = glsAutoDetect. This is called from FileExtensionsOptionsGenerated where each extension is registered, the exception only occurs on the first one not subsequent ones.

After that I cannot fnd any more errors but none of the other code seems to get called (again bear in mind my limited knowledge of extensions!).

Only other possible thing I spotted was a compiler warning:

warning MSB3277: Found conflicts between different versions of "System.Reflection" that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.

Anything else I can check?

@danielscherzer
Copy link
Owner

danielscherzer commented Apr 24, 2020

Thanks for the praise! The exception on line 21 of FileExtensionsOption.cs normally means that some other extension has registered for this file extension and my extension cannot override this. Regrettably, there is not much documentation (that I found) how to circumvent this. If this happens only for .glsl you could try if other shaders like .vert etc are still working or you could set a different extension in the visual studio option dialog.

If it is an InvalidOperationException my extension writes a "helpfull" message into the ouptut pane. I pushed a new version that writes the full exception information to the output pane.

@Keith99
Copy link
Author

Keith99 commented Apr 24, 2020

Thanks Daniel, that was spot on. I tried the other types and they worked so I renamed all my shaders to have the extension ._glsl and added that as a type in the options and it works. Of course I would prefer them to be called .glsl but it does not really matter as they are just text files at the end of the day.

Thinking about what other extension I have, the only one is NSight which may very well work with shaders.

@danielscherzer
Copy link
Owner

yes nsight does use glsl for some purpose

@danielscherzer
Copy link
Owner

ok this is the a duplicate of #32. I will close this one.

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

No branches or pull requests

2 participants