|
1 | 1 | using System.Collections.Generic; |
2 | 2 | using System.Collections.ObjectModel; |
| 3 | +using System.IO; |
3 | 4 | using Dibix.Sdk.Abstractions; |
4 | 5 | using Dibix.Sdk.CodeAnalysis; |
5 | 6 | using Dibix.Sdk.CodeGeneration; |
@@ -84,15 +85,19 @@ private partial bool Execute() |
84 | 85 | IFileSystemProvider fileSystemProvider = new PhysicalFileSystemProvider(_configuration.SqlCore.ProjectDirectory); |
85 | 86 | IActionParameterConverterRegistry actionParameterConverterRegistry = new ActionParameterConverterRegistry(); |
86 | 87 | IActionParameterSourceRegistry actionParameterSourceRegistry = new ActionParameterSourceRegistry(); |
87 | | - UserConfigurationLoader userConfigurationLoader = new UserConfigurationLoader |
88 | | - ( |
89 | | - _configuration.SqlCore.ConfigurationFilePath |
90 | | - , fileSystemProvider |
91 | | - , _logger |
92 | | - , new SqlCodeAnalysisUserConfigurationReader(sqlCodeAnalysisConfiguration) |
93 | | - , new CodeGenerationUserConfigurationReader(codeGenerationConfiguration, actionParameterSourceRegistry, actionParameterConverterRegistry, _logger) |
94 | | - ); |
95 | | - userConfigurationLoader.Load(); |
| 88 | + |
| 89 | + if (File.Exists(_configuration.SqlCore.ConfigurationFilePath)) |
| 90 | + { |
| 91 | + UserConfigurationLoader userConfigurationLoader = new UserConfigurationLoader |
| 92 | + ( |
| 93 | + _configuration.SqlCore.ConfigurationFilePath |
| 94 | + , fileSystemProvider |
| 95 | + , _logger |
| 96 | + , new SqlCodeAnalysisUserConfigurationReader(sqlCodeAnalysisConfiguration) |
| 97 | + , new CodeGenerationUserConfigurationReader(codeGenerationConfiguration, actionParameterSourceRegistry, actionParameterConverterRegistry, _logger) |
| 98 | + ); |
| 99 | + userConfigurationLoader.Load(); |
| 100 | + } |
96 | 101 |
|
97 | 102 | if (_logger.HasLoggedErrors) |
98 | 103 | return false; |
|
0 commit comments