{"record":{"id":"63ac084ae27efbf6","repo":"microsoft/semantic-kernel","slug":"no-proto-document-for-the-specified-path-filep","errorCode":null,"errorMessage":"No .proto document for the specified path - {filePath} is found.","messagePattern":"No \\.proto document for the specified path - (.+?) is found\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Functions/Functions.Grpc/Extensions/GrpcKernelExtensions.cs","lineNumber":107,"sourceCode":"    /// <param name=\"executionParameters\">Optional gRPC function execution parameters.</param>\n    /// <returns>A list of all the prompt functions representing the plugin.</returns>\n    public static KernelPlugin CreatePluginFromGrpcDirectory(\n        this Kernel kernel,\n        string parentDirectory,\n        string pluginDirectoryName,\n        GrpcFunctionExecutionParameters? executionParameters = null)\n    {\n        const string ProtoFile = \"grpc.proto\";\n\n        KernelVerify.ValidPluginName(pluginDirectoryName, kernel.Plugins);\n\n        var pluginDir = Path.Combine(parentDirectory, pluginDirectoryName);\n        Verify.DirectoryExists(pluginDir);\n\n        var filePath = Path.Combine(pluginDir, ProtoFile);\n        if (!File.Exists(filePath))\n        {\n            throw new FileNotFoundException($\"No .proto document for the specified path - {filePath} is found.\");\n        }\n\n        if (kernel.LoggerFactory.CreateLogger(typeof(GrpcKernelExtensions)) is ILogger logger &&\n            logger.IsEnabled(LogLevel.Trace))\n        {\n            logger.LogTrace(\"Registering gRPC functions from {0} .proto document\", filePath);\n        }\n\n        using var stream = File.OpenRead(filePath);\n\n        return kernel.CreatePluginFromGrpc(stream, pluginDirectoryName, executionParameters);\n    }\n\n    /// <summary>\n    /// Imports gRPC document from a file.\n    /// </summary>\n    /// <param name=\"kernel\">The <see cref=\"Kernel\"/> containing services, plugins, and other state for use throughout the operation.</param>\n    /// <param name=\"filePath\">File path to .proto document.</param>","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Functions/Functions.Grpc/Extensions/GrpcKernelExtensions.cs#L89-L125","documentation":"Thrown by `Kernel.CreatePluginFromGrpc` (the directory-overload) when no `grpc.proto` file exists inside the computed plugin directory. The method builds `parentDirectory/pluginDirectoryName/grpc.proto` and checks File.Exists before opening; a missing file is treated as a deployment/setup error.","triggerScenarios":"Calling `kernel.CreatePluginFromGrpc(parentDir, pluginName)` where the plugin folder lacks a `grpc.proto`, or the folder name is misspelled so the resolved path is wrong.","commonSituations":"Wrong working directory / relative path; plugin assets not copied to the output directory; renamed plugin folder; case-sensitive filesystem mismatch.","solutions":["Confirm the directory contains a file named exactly `grpc.proto`.","Check the resolved `pluginDir` path (parentDirectory + pluginDirectoryName) is what you expect.","Ensure the .proto file is marked 'Copy to Output Directory' in your .csproj."],"exampleFix":"// before\nkernel.CreatePluginFromGrpc(@\"./plugins\", \"math\");\n// after\n// verify ./plugins/math/grpc.proto exists, then:\nkernel.CreatePluginFromGrpc(@\"./plugins\", \"math\");","handlingStrategy":"validation","validationCode":"var protoPath = Path.Combine(parentDirectory, pluginDirectoryName, \"grpc.proto\");\nif (!File.Exists(protoPath))\n    throw new InvalidOperationException($\"Expected .proto at {protoPath}\");\nkernel.CreatePluginFromGrpc(parentDirectory, pluginDirectoryName);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Mark .proto files as CopyToOutputDirectory in .csproj.","Log the resolved plugin directory during startup."],"tags":["grpc","plugin","file-not-found","configuration"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}