I'm having a problem with config.dev.json I think. When I attempt to debug the project it tells me that something is missing. I'm not sure what though.
Using Visual Studio 2015, ASP.net 5, Most dependencies are on beta 7. The config dependencies are beta 4.
Error text:
Severity Code Description Project File Line
Error CS1002 ; expected <NameSpace>.DNX 4.5.1 \src\<SiteName>\Startup.cs 25
Code extracts are below:
project.json:
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Microsoft.Framework.ConfigurationModel": "1.0.0-beta4",
startup.cs:
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.Configuration.Json;
private IConfiguration config;
public Startup()
{
config = new Configuration()
.AddEnvironmentVariables()
.AddJsonFile("config.json")
.AddJsonFile("config.dev.json", true)
}
config.json:
{
"debug": false,
"RecreateDatabase": false
}
config.dev.json:
{
"debug": true,
"RecreateDatabase": true,
"Data": {
"BlogData": { "ConnectionString": "Server=<DBHostName>;Database=<DatabaseName;User ID=<DBUserName>;Password=<PWD>;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" },
"Identity": { "ConnectionString": "Server=<DBHostName>;Database=<DatabaseName>_Identity;User ID=<DBUserName>;Password=<PWD>;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;" }
}
}
Any suggestions very welcome.