danielscherzer / GLSL

VSIX Project that provides GLSL language integration.
258 stars 28 forks source link

Does not work with VS 2022 #101

Closed ComeOnAndSam closed 1 year ago

ComeOnAndSam commented 2 years ago

Installed product versions

Description

Replace this text with a short description

Steps to recreate

  1. Install the 2022 version of the extension
  2. Launch VS 2022
  3. Error message pops up
  4. "The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did no load correctly"

Current behavior

VS 2022 breaks entirely and can't compile anything after installing this extension

Activity log pointed at by the error message: ActivityLog.zip

c-mendoza commented 2 years ago

Same issue here.

danielscherzer commented 2 years ago

Strange! I too use VS2022 Enterprise and have no problems.

IwakuraRein commented 2 years ago

Me too...

alexfevery commented 2 years ago

I also cannot get it to work for VS community 2022. None of the file extension types work. Version 17.2.0

danielscherzer commented 2 years ago

Does any of you use nsight?

alexfevery commented 2 years ago

Does any of you use nsight?

No. nor any other tools for graphics programming.

alexfevery commented 2 years ago

I have figured out why it wasn't working in my case. Under Tools>Options>Text Editor>File Extension I had added glsl file types with the "Microsoft Visual C#" editing experience. Removing this makes your extension work again. But now I lost the ability to use "Format Document". Any way to fix this?

MarkusMiller commented 2 years ago

I have the same issues with the community edition of VS 2022. I do use NSsight, though, but it seems the issue occurs independently from that. When I enable the extension, the entire editor is busted and doesn't show anything anymore.

Visual Studio is telling that a module couldn't be loaded and that this message should be displayed each time again or not.

danielscherzer commented 2 years ago

Removing this makes your extension work again. But now I lost the ability to use "Format Document". Any way to fix this?

I think for this to work again I would have to implement this functionality for glsl files anew. If anyone has a shortcut for this please feel free to reply.

kyamant commented 2 years ago

On VS 2022 Enterprise (Version 17.2.6), I am getting "Could not create glslRayGeneration instance. Are your drivers up-to-date?" message. Moreover, this is causing devenv.exe to disable my screen timeout!

$powercfg -requests
DISPLAY:
[PROCESS] \Device\HarddiskVolume7\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe
danielscherzer commented 2 years ago

On VS 2022 Enterprise (Version 17.2.6), I am getting "Could not create glslRayGeneration instance. Are your drivers up-to-date?" message. Moreover, this is causing devenv.exe to disable my screen timeout!

$powercfg -requests
DISPLAY:
[PROCESS] \Device\HarddiskVolume7\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe

If you get this error the extension should get loaded, so this answer will not help others watching this issue. This error should indicate that a ray generation shader is syntax checked by my extension, but your graphics card driver does not support this. You can either use an external compiler or switch of error squiggle generation in the options.

kyamant commented 2 years ago

my graphics card is a RTX 3070 ti and driver is the latest from nvidia 516.59! The only solution I see is to disable/uninstall your extension

MarkusMiller commented 2 years ago

Hello, I also tried your latest release (the one 7 days ago) and it's still the same error. The editor is reporting this error: System.ArgumentException: No EditorOptionDefinition export found for the given option name: EditingState/EditingStateEndingMargin Parametername: optionId

And there were a couple of error messages before, pointing to the ActivityLog for further information ActivityLog.xml.txt .

kyamant commented 2 years ago

Setting the external compiler to %VULKAN_SDK%\Bin\glslangValidator.exe and arguments to --target-env spirv1.4 got rid of the message. The screen timeout is still disabled until I close that VS2022 instance:

$powercfg -requests
DISPLAY:
[PROCESS] \Device\HarddiskVolume7\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe
danielscherzer commented 2 years ago

Hello, I also tried your latest release (the one 7 days ago) and it's still the same error. The editor is reporting this error: System.ArgumentException: No EditorOptionDefinition export found for the given option name: EditingState/EditingStateEndingMargin Parametername: optionId

And there were a couple of error messages before, pointing to the ActivityLog for further information ActivityLog.xml.txt .

This error could be related with a corrupt ComponentModelCache of Visual Studio as discussed here: https://stackoverflow.com/questions/33168357/no-editoroptiondefinition-export-found-for-the-given-option-nametextviewhost-l

TheSabby101 commented 2 years ago

The highlighting stopped working the moment I installed nsight, I don't see any errors though.

danielscherzer commented 2 years ago

The highlighting stopped working the moment I installed nsight, I don't see any errors though.

This is a known issue #103 and #76 with nsight. one possible workaround is to use different shader filename extensions

MarkusMiller commented 2 years ago

Hello, I also tried your latest release (the one 7 days ago) and it's still the same error. The editor is reporting this error: System.ArgumentException: No EditorOptionDefinition export found for the given option name: EditingState/EditingStateEndingMargin Parametername: optionId And there were a couple of error messages before, pointing to the ActivityLog for further information ActivityLog.xml.txt .

This error could be related with a corrupt ComponentModelCache of Visual Studio as discussed here: https://stackoverflow.com/questions/33168357/no-editoroptiondefinition-export-found-for-the-given-option-nametextviewhost-l

I tried the suggested solution there, but unfortunately, it didn't change anything. It's still the same popup error when opening a solution, telling me, that either a recent change in configuration or installation of an extension might have caused the problem. Then I have to disable the GLSL language integration extension and all is back to working again.

Edit: Turns out, though, that after updating Visual Studio (it somehow just became available today) it now works without issues.

danielscherzer commented 2 years ago

I tried the suggested solution there, but unfortunately, it didn't change anything. It's still the same popup error when opening a solution, telling me, that either a recent change in configuration or installation of an extension might have caused the problem. Then I have to disable the GLSL language integration extension and all is back to working again.

Edit: Turns out, though, that after updating Visual Studio (it somehow just became available today) it now works without issues.

Thanks for the feedback. Visual Studio 2022 seems to cause on/off problems, but I do not know what the root issue is.

alexfevery commented 2 years ago

The extension is working well for me but its really a pain having to format and tab align the code manually. Is it possible to add GLSL as an option here? That way we can set it up to autoformat the document to our liking.

image
MarkusMiller commented 2 years ago

The extension is working well for me but its really a pain having to format and tab align the code manually. Is it possible to add GLSL as an option here? That way we can set it up to autoformat the document to our liking.

image

Actually, auto-formatting works, if I rename my shader extension back to .glsl (NSIght is probably taking over then again, I assume)... doesn't work, though, when the file extension is .frag/*.vert...

danielscherzer commented 2 years ago

For issues with nvidia nsight please post to issue #76 For new features, like auto format please open a new thread. For this thread the issue is VS 2022. Does it still not work for somebody after upgrading to VS 17.3?

danielscherzer commented 2 years ago

The extension is working well for me but its really a pain having to format and tab align the code manually. Is it possible to add GLSL as an option here? That way we can set it up to autoformat the document to our liking.

image

Actually, auto-formatting works, if I rename my shader extension back to *.glsl (NSIght is probably taking over then again, I assume)... doesn't work, though, when the file extension is .frag/.vert...

Yes I would guess that too.

alexfevery commented 2 years ago

Can you explain how to do that? I really would like auto formatting. For mine adding its extension to VS options to enable auto formatting will disable error glsl highlighting. Here I added .frag but not .vert and only .vert error highlighting works. (I have no nsight installed)

image
danielscherzer commented 2 years ago

This would be a new feature. A new issue #105 is now open for this.

danielscherzer commented 2 years ago

Any startup/initialization problems with VS 17.3 and the extension? Otherwise I would close this issue.