简介
当我们遇到这样的报错时,我们可能第一反应就是,怎么会这样,我应该怎么才能解决掉这个问题
步骤
1.读懂这个问题
2.分析问题可能产生的原因
3.检查问题点
4.尝试修改
5.重复3,4步骤
案例
1.读懂问题
Senparc.Ncf.Core.Exceptions.NCFExceptionBase: 无法找到数据库配置:Local,请在 SenparcConfig.config 中进行配置
译文:无法找到数据库配置
2.分析问题
当我们看到这样的字样的时候,一般可以判定是我们执行migration的项目读取的SenparcConfig的文件目录错误了
那么请检查你当前的场景是不是切换过输出xml文件的路径
3.检查问题点
方法1:
方法2:
项目--属性--生成
4.尝试修改
方法1修改:
方法2修改:
重新执行结果如下图所示
就可以看到,我们已经成功的解决了这个问题,由此我们可以知道,类似的问题,我们编译的时候需要注意排查
养成一个好的习惯,如果仍未解决掉,请重试3,4的顺序来进行调试
希望大家写出无Bug的项目
欢迎大家找我交流