{"record":{"id":"964c4deafac0a5a0","repo":"dotnet/maui","slug":"no-application-was-found-in-the-specified-director","errorCode":null,"errorMessage":"No application was found in the specified directories.","messagePattern":"No application was found in the specified directories\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"eng/devices/devices-shared.cake","lineNumber":74,"sourceCode":"                Information($\"No universal binary found, checking RID-specific directory: {binDir}\");\n                applications = FindAppsInDirectory(binDir);\n            }\n        }\n        else\n        {\n            applications = FindAppsInDirectory(binDir);\n        }\n    }\n\n    // If no applications found, check in specific artifact directories\n    if (!applications.Any())\n    {\n        applications = SearchInArtifacts(binDir, project, config, tfm, rid, isAndroid, artifactsDir);\n    }\n\n    if (!applications.Any())\n    {\n        throw new Exception($\"No application was found in the specified directories.\");\n    }\n\n    return applications;\n}\n\nIEnumerable<string> SearchInArtifacts(DirectoryPath originalBinDir, string project, string config, string tfm, string rid, bool isAndroid, string artifactsDir)\n{\n    foreach (var entry in projectMappings)\n    {\n        if (project.Contains(entry.Key))\n        {\n            var binDir = MakeAbsolute(new DirectoryPath($\"{artifactsDir}{entry.Value}/{config}/{tfm}/{rid}\"));\n            IEnumerable<string> applications;\n\n            if (isAndroid)\n            {\n                applications = FindApksInDirectory(binDir);\n            }","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/dotnet/maui/blob/f377ff1c5ee04d334d8a925f50c83a6b7afddf03/eng/devices/devices-shared.cake#L56-L92","documentation":"Thrown by GetTestApplications after exhausting all search locations: the bin directory, FindAppsInDirectory, and SearchInArtifacts (which checks project-mapped artifact directories for config/tfm/rid). If none yield any application file, the build cannot find a deployable app to test.","triggerScenarios":"applications remains empty after checking binDir, FindAppsInDirectory(binDir), and SearchInArtifacts(binDir, project, config, tfm, rid, isAndroid, artifactsDir). No .apk/.app/.appx matches the supplied parameters.","commonSituations":"The app was never built; built under a different configuration/TFM/RID than the test step queries; the artifactsDir/projectMappings don't cover the project; a publish-vs-build mismatch (looking in bin/ but app is in publish/ or artifacts/).","solutions":["Build the target app with the exact configuration, TFM, and runtime identifier the test step expects.","Verify artifactsDir is set and that projectMappings includes the project under test.","Inspect the actual artifact layout (bin vs artifacts) and align the search inputs, or pass an explicit app path.","If using a solution filter, ensure the app project is included in the filter that ran."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var applications = FindAppsInDirectory(binDir);\nif (!applications.Any())\n    applications = SearchInArtifacts(binDir, project, config, tfm, rid, isAndroid, artifactsDir);\nif (!applications.Any())\n    throw new Exception($\"No app found. Searched bin='{binDir}' and artifacts for project='{project}', config='{config}', tfm='{tfm}', rid='{rid}'. Build the app first.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always run the app build step before the test step with matching config/tfm/rid.","Ensure projectMappings covers every project under test.","Log every directory searched so missing-app failures are self-diagnosing."],"tags":["test-app","build-artifact","search","config","tfm","rid"],"backgroundTag":null,"analyzedSha":"f377ff1c5ee04d334d8a925f50c83a6b7afddf03","analyzedAt":"2026-08-13T14:26:18.069Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}