GLSL icon indicating copy to clipboard operation
GLSL copied to clipboard

Does not work with VS 2022

Open ComeOnAndSam opened this issue 2 years ago • 26 comments

Installed product versions

  • Visual Studio: Community 2022
  • This extension: 0.11.158

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

ComeOnAndSam avatar Apr 18 '22 14:04 ComeOnAndSam

Same issue here.

c-mendoza avatar May 03 '22 15:05 c-mendoza

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

danielscherzer avatar May 13 '22 16:05 danielscherzer

Me too...

IwakuraRein avatar May 19 '22 02:05 IwakuraRein

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

alexfevery avatar Jun 10 '22 22:06 alexfevery

Does any of you use nsight?

danielscherzer avatar Jun 11 '22 17:06 danielscherzer

Does any of you use nsight?

No. nor any other tools for graphics programming.

alexfevery avatar Jun 11 '22 17:06 alexfevery

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?

alexfevery avatar Jun 11 '22 17:06 alexfevery

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.

MarkusMiller avatar Jul 25 '22 21:07 MarkusMiller

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.

danielscherzer avatar Jul 28 '22 19:07 danielscherzer

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

kyamant avatar Aug 01 '22 19:08 kyamant

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.

danielscherzer avatar Aug 03 '22 10:08 danielscherzer

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

kyamant avatar Aug 03 '22 10:08 kyamant

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 .

MarkusMiller avatar Aug 03 '22 14:08 MarkusMiller

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

kyamant avatar Aug 03 '22 15:08 kyamant

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

danielscherzer avatar Aug 03 '22 18:08 danielscherzer

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

TheSabby101 avatar Aug 08 '22 03:08 TheSabby101

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

danielscherzer avatar Aug 08 '22 10:08 danielscherzer

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.

MarkusMiller avatar Aug 08 '22 15:08 MarkusMiller

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.

danielscherzer avatar Aug 09 '22 13:08 danielscherzer

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

alexfevery avatar Aug 09 '22 15:08 alexfevery

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

MarkusMiller avatar Aug 09 '22 15:08 MarkusMiller

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 avatar Aug 16 '22 07:08 danielscherzer

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.

danielscherzer avatar Aug 16 '22 07:08 danielscherzer

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

alexfevery avatar Aug 16 '22 14:08 alexfevery

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

danielscherzer avatar Aug 17 '22 06:08 danielscherzer

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

danielscherzer avatar Aug 17 '22 07:08 danielscherzer