{"record":{"id":"bbfe45ccb28ce00a","repo":"stride3d/stride","slug":"xkfx-effect-0-not-found","errorCode":null,"errorMessage":"Xkfx effect [{0}] not found","messagePattern":"Xkfx effect \\[(.+?)\\] not found","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"sources/shaders/Stride.Shaders.Effects/ShaderMixinManager.cs","lineNumber":107,"sourceCode":"        /// <exception cref=\"System.ArgumentException\">sdfxEffectName</exception>\n        public static ShaderMixinSource Generate(string sdfxEffectName, ParameterCollection properties)\n        {\n            if (sdfxEffectName == null) throw new ArgumentNullException(\"sdfxEffectName\");\n\n            if (properties == null)\n                throw new ArgumentNullException(\"properties\");\n\n            // Get the effect name and child effect name \"RootEffectName.ChildEffectName\"\n            var effectName = GetEffectName(sdfxEffectName);\n            var rootEffectName = effectName.Key;\n            var childEffectName = effectName.Value;\n\n            IShaderMixinBuilder builder;\n            Dictionary<string, IShaderMixinBuilder> builders;\n            lock (RegisteredBuilders)\n            {\n                if (!TryGet(rootEffectName, out builder))\n                    throw new ArgumentException(string.Format(\"Xkfx effect [{0}] not found\", rootEffectName), \"sdfxEffectName\");\n\n                builders = new Dictionary<string, IShaderMixinBuilder>(RegisteredBuilders);\n            }\n\n            // TODO cache mixin context and avoid to recreate one (check if if thread concurrency could occur here)\n            var mixinTree = new ShaderMixinSource() { Name = sdfxEffectName };\n            var context = new ShaderMixinContext(mixinTree, properties, builders) { ChildEffectName = childEffectName };\n            try\n            {\n                builder.Generate(mixinTree, context);\n            }\n            catch (ShaderMixinDiscardException)\n            {\n                // We don't rethrow as this exception is on purpose to early exit/escape from a shader mixin\n            }\n            return mixinTree;\n        }\n","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/shaders/Stride.Shaders.Effects/ShaderMixinManager.cs#L89-L125","documentation":"Generate throws ArgumentException when no IShaderMixinBuilder is registered under the root effect name. TryGet fails inside the registry lookup, indicating the requested effect was never registered or its assembly wasn't loaded.","triggerScenarios":"Calling Generate with an effect name that has no registered builder; typo in effect name; module that registers builders (e.g. Xkdk/effects registrations) not loaded; \"Root.Child\" name where the Root part is unregistered.","commonSituations":"Misspelled PDXFX effect names in materials/assets; missing EffectSystem registration of custom effects; using an effect from a Stride module whose bootstrapping wasn't run in the tool.","solutions":["Verify the exact effect name spelling against the registered builders (check ShaderMixinManager.Register calls).","Ensure the assembly/module that registers the builder is loaded before generation (referencing Stride.Graphics/Effects modules).","For custom effects, call ShaderMixinManager.Register with your IShaderMixinBuilder before Generate.","If using \"RootEffect.ChildEffect\" syntax, confirm the root effect is registered."],"exampleFix":"// before\nvar mixin = ShaderMixinManager.Generate(\"StrideNotRegisteredEffect\", parameters);\n// after\nif (!ShaderMixinManager.Contains(\"MyCustomEffect\"))\n    ShaderMixinManager.Register(\"MyCustomEffect\", new MyEffectBuilder());\nvar mixin = ShaderMixinManager.Generate(\"MyCustomEffect\", parameters);","handlingStrategy":"try-catch","validationCode":"if (!ShaderMixinManager.Contains(effectName))\n    throw new InvalidOperationException($\"Effect '{effectName}' is not registered; check spelling and module registration\");","typeGuard":null,"tryCatchPattern":"try { mixin = ShaderMixinManager.Generate(name, parameters); }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"not found\")) { log.LogError(ex, \"Unregistered effect: ensure Register was called and name is correct\"); throw; }","preventionTips":["Verify effect names against registered builders (grep ShaderMixinManager.Register calls)","Load/register all effect modules before generation","For Root.Child names, confirm the root effect exists"],"tags":["csharp","shaders","effect-not-found"],"backgroundTag":"resource-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}