static RedisHelper() { Directory.SetCurrentDirectory("..");//设置当前路径为当前解决方案的路径 string appSettingBasePath = Directory.GetCurrentDirectory() + "/Centa.Agency.WebApi";//改成你的appsettings.json所在的项目名称 var configBuilder = new ConfigurationBuilder()