Skip to content

Commit a025407

Browse files
Add error handling for T4 compilation errors (#36995)
1 parent f47a6e8 commit a025407

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/EFCore.Design/Scaffolding/Internal/TextTemplatingModelGenerator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ public override ScaffoldedModel GenerateModel(IModel model, ModelCodeGenerationO
167167
.GetAwaiter().GetResult();
168168
entityTypeExtension = host.Extension;
169169
CheckEncoding(host.OutputEncoding);
170+
HandleErrors(host);
170171
}
171172

172173
generatedCode = compiledEntityTypeTemplate.Process();
@@ -211,6 +212,7 @@ public override ScaffoldedModel GenerateModel(IModel model, ModelCodeGenerationO
211212
.GetAwaiter().GetResult();
212213
configurationExtension = host.Extension;
213214
CheckEncoding(host.OutputEncoding);
215+
HandleErrors(host);
214216
}
215217

216218
generatedCode = compiledConfigurationTemplate.Process();

0 commit comments

Comments
 (0)