Just tried a new app today - and got this error:
"Connection string not supported"
Here's the code:
var documentStore = new DocumentStore
{
ConnectionStringName = "RavenDb"
};
Looking at the source "ConnectionStringParser.cs" ...
public static ConnectionStringParser<TConnectionString> FromConnectionStringName(string connectionStringName)
{
#if !(MONODROID || DNXCORE50)
var connectionStringSettings = ConfigurationManager.ConnectionStrings[connectionStringName];
if (connectionStringSettings == null)
throw new ArgumentException(string.Format("Could not find connection string name: '{0}'", connectionStringName));
return new ConnectionStringParser<TConnectionString>(connectionStringName, connectionStringSettings.ConnectionString);
#else
throw new ArgumentException(string.Format("Connection string not supported"));
#endif
}
So is this code saying..
If you're in the newer stuff (.NET Core) or some monodroid stuff ... then bad luck, throw an exception because ConnectionStrings.cs might not exist, now that things have changed.
Otherwise ... give it a try...
Is that right? so the future ways would be to provide the full connection instead, which means .. how ever you read it in .. that's up to you.
-PK-