Skip to content

Missing glslangValidator.exe for Vulkan builds #2001

@Basewq

Description

@Basewq

Release Type: Official Release

Version: 4.1.0.1728 and beyond

Platform(s): Windows/Linux/Mac(?)

Describe the bug
Running any projects with <StrideGraphicsApi>Vulkan</StrideGraphicsApi> crashes the app with the error
System.AggregateException: 'One or more errors occurred. (One or more errors occurred. (An error occurred trying to start process 'win-x64\glslangValidator.exe' with working directory 'C:\[PATH]\FirstPersonShooter2\Bin\Windows\Debug'. The system cannot find the file specified.))'

To Reproduce
Steps to reproduce the behavior:

  1. Start any template
  2. Add <StrideGraphicsApi>Vulkan</StrideGraphicsApi> to the .Windows.csproj file
  3. Build and run
  4. Encounter exception

Expected behavior
Include glslangValidator.exe in the build output so the app doesn't crash.

Additional context
Bug introduced by #1428
Stride.Shaders.Compiler package changed glslangValidator.exe/glslangValidator.bin to be treated as contentFiles in nuget package (as seen in C:\Users\[USERNAME]\.nuget\packages\stride.shaders.compiler\4.1.0.1948\stride.shaders.compiler.nuspec)

The game project indirectly references this library via Stride.Engine however that package declares all contentfiles as private assets so do not get added to the build output, ie.
<PackageReference Include="Stride.Engine" Version="4.1.0.1948" PrivateAssets="contentfiles;analyzers" />

Workaround
Explicitly reference Stride.Shaders.Compiler in the .Game.csproj to include contentFiles, ie.
<PackageReference Include="Stride.Shaders.Compiler" Version="4.1.0.1948" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions