Skip to main content

JeremyAnsel.HLSL.Targets adds MSBuild support for HLSL compilation.

Total Downloads
205.0K
205,030
Published
Aug 9, 2026
2mo ago

Get Started

dotnet add package JeremyAnsel.HLSL.Targets --version 2.0.35
ProductVersions
.NET Standard
netstandard2.0
Other
.NETFramework4.8

README

JeremyAnsel.HLSL.Targets

Build status NuGet Version License

JeremyAnsel.HLSL.Targets adds MSBuild support for HLSL compilation.

Description Value
License The MIT License (MIT)
Source code https://github.com/JeremyAnsel/JeremyAnsel.HLSL.Targets
Nuget https://www.nuget.org/packages/JeremyAnsel.HLSL.Targets
Build https://ci.appveyor.com/project/JeremyAnsel/jeremyansel-hlsl-targets/branch/master

Usage

To build a hlsl shader file set the "Build Action" property to "HLSL Shader" in the "Advanced" category of the properties window. Then in the "HLSL" category set the "Shader Profile" property to a shader profile.

Shader profiles

Supported shader profiles are:

  • Compute Shader 5.0
  • Domain Shader 5.0
  • Geometry Shader 5.0
  • Hull Shader 5.0
  • Pixel Shader 5.0
  • Vertex Shader 5.0
  • Compute Shader 4.1
  • Geometry Shader 4.1
  • Pixel Shader 4.1
  • Vertex Shader 4.1
  • Compute Shader 4.0
  • Geometry Shader 4.0
  • Pixel Shader 4.0
  • Vertex Shader 4.0
  • Pixel Shader 4.0 level 9.1
  • Pixel Shader 4.0 level 9.3
  • Vertex Shader 4.0 level 9.1
  • Vertex Shader 4.0 level 9.3
  • Pixel Shader 3.0
  • Vertex Shader 3.0
  • Pixel Shader 2.0
  • Vertex Shader 2.0

Default shader code

If a shader profile is selected for an empty file then the file will be filled with a default shader code.

Output filename

On compiling the project the default output filename for a shader file is the filename of the shader file with a ".cso" extension.

Custom properties

Additional properties are:

  • "Object File Output Name" to set the object file output name
  • "Inserts Debug Information" to insert debug information into the output code
  • "Preprocessor Definitions" to set the preprocessor definitions
  • "Entry Point Name" to set the entry point name
  • "Treat Warning As Error" to treat warning as error
  • "Output Disassembly Shader" to output disassembly shader
  • "Output Disassembly Shader in HTML" to output disassembly shader in HTML

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.