tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
553 stars 95 forks source link

hlsl.additionalIncludeDirectories not working? #268

Closed xoofx closed 4 weeks ago

xoofx commented 4 weeks ago

Hey Tim,

As part of my project XenoAtom.ShaderCompiler, I was trying to generate automatically a shadertoolsconfig.json from the csproj like this:

{
  "root": true,
  "hlsl.preprocessorDefinitions": {},
  "hlsl.additionalIncludeDirectories": [
    "../Shared"
  ],
  "hlsl.virtualDirectoryMappings": {}
}

The folder is definitely there (as my compiler is running fine), but HLSL Tools seems to not pick up the include folder .\Shared:

image

I tried to put an absolute path. I looked at the code and I don't see anything wrong, so I'm not sure what's going on.

I'm on Visual Studio 2022 - Version 17.10.2 and the reported version for HLSL Tools is 1.1.320

xoofx commented 4 weeks ago

When I move the mouse over "SubFolder" it shows nothing in the tooltip search paths:

image

So the file doesn't seem to be processed. 🤔

xoofx commented 4 weeks ago

Nevermind, it seems to be Resharper that is conflicting 😮 If I disable R# everything is back to normal, sorry for the noise. Will follow this with R# folks.

xoofx commented 4 weeks ago

From R# team, it's possible to let HLSL Tools be the default HLSL experience in VS by tuning in R#:

Turn off HLSL support by adding *.hlsl to "Code editing | Third-party code | Skipped code | File masks".