{"record":{"id":"f346a626098dd67d","repo":"dotnet/orleans","slug":"unknown-playground-storage-provider-value-storag","errorCode":null,"errorMessage":"Unknown Playground:Storage:Provider value '{storageProvider}'. Use 'Azurite' or 'Azure'.","messagePattern":"Unknown Playground:Storage:Provider value '(.+?)'\\. Use 'Azurite' or 'Azure'\\.","errorType":"validation","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"playground/DurableJobsJournaling/DurableJobsJournaling.AppHost/Program.cs","lineNumber":53,"sourceCode":"var storage = builder.AddAzureStorage(\"storage\");\nif (useAzurite)\n{\n    storage.RunAsEmulator();\n}\nelse if (useAzure)\n{\n    storage.ConfigureInfrastructure(infrastructure =>\n    {\n        var storageAccount = infrastructure.GetProvisionableResources().OfType<StorageAccount>().Single();\n        storageAccount.Kind = StorageKind.BlockBlobStorage;\n        storageAccount.Sku = new StorageSku { Name = StorageSkuName.PremiumLrs };\n        storageAccount.AccessTier.ClearValue();\n        RemoveUnsupportedPremiumBlobStorageOutputs(infrastructure);\n    });\n}\nelse\n{\n    throw new InvalidOperationException($\"Unknown Playground:Storage:Provider value '{storageProvider}'. Use 'Azurite' or 'Azure'.\");\n}\n\nvar blobs = storage.AddBlobs(\"blobs\");\nvar tableStorage = useAzurite ? storage : builder.AddAzureStorage(\"clusteringstorage\");\nif (useAzure && builder.ExecutionContext.IsPublishMode)\n{\n    storage.ClearDefaultRoleAssignments();\n    tableStorage.ClearDefaultRoleAssignments();\n}\n\nvar tables = tableStorage.AddTables(\"tables\");\n\nvar orleans = builder.AddOrleans(\"cluster\")\n    .WithClustering(tables);\n\nvar storagePrefix = $\"run-{DateTimeOffset.UtcNow:yyyyMMdd-HHmmss}\";\nvar silo = builder.AddProject<Projects.DurableJobsJournaling_Silo>(\"silo\")\n    .WithReference(orleans)","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/dotnet/orleans/blob/fca799fa70ecb6ad975224271703ca43221f58de/playground/DurableJobsJournaling/DurableJobsJournaling.AppHost/Program.cs#L35-L71","documentation":"An InvalidOperationException thrown by the DurableJobsJournaling Aspire AppHost when the configuration value 'Playground:Storage:Provider' is neither 'Azurite' nor 'Azure'. The AppHost uses this switch to decide whether to provision a real Azure StorageAccount (with a specific SKU/Kind) or run the Azurite emulator for local development. An unrecognized value has no provisioning path, so it fails fast.","triggerScenarios":"Launching the AppHost with Playground:Storage:Provider set to a typo, an empty string, or an unsupported token (e.g., 'Local', 'Cosmos', 'Storage'). The two if-branches for useAzurite/useAzure both evaluate false and execution reaches the throw.","commonSituations":"Misconfigured appsettings.json, a typo in the launch profile / environment variable, or copying the sample with a different config key name. Renaming the key without updating the comparison.","solutions":["Set Playground:Storage:Provider to 'Azurite' for local development (no Azure account needed) or 'Azure' for cloud.","Check appsettings.json, the launchSettings.json environment variables, and any user-secrets for the exact spelling/casing of the key.","If you genuinely need a third provider, add a corresponding provisioning branch before the throw."],"exampleFix":"// before (config)\n\"Playground\": { \"Storage\": { \"Provider\": \"local\" } }\n\n// after\n\"Playground\": { \"Storage\": { \"Provider\": \"Azurite\" } }","handlingStrategy":"validation","validationCode":"var provider = builder.Configuration[\"Playground:Storage:Provider\"];\nif (provider is not (\"Azurite\" or \"Azure\"))\n    throw new InvalidOperationException($\"Unsupported provider '{provider}'. Use 'Azurite' or 'Azure'.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Document the two valid values in the sample README.","Fail fast with the allowed values listed (the message already does).","Use configuration validation (ValidateDataAnnotations or a startup check) to catch typos at launch."],"tags":["aspire","apphost","configuration","azure-storage","argument-validation"],"backgroundTag":null,"analyzedSha":"fca799fa70ecb6ad975224271703ca43221f58de","analyzedAt":"2026-08-13T19:55:57.938Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}