You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CodeGenEngine/ErrorReporting.dbl
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,8 @@
45
45
import System
46
46
import System.Collections.Generic
47
47
import System.IO
48
+
import System.Reflection
49
+
import System.Diagnostics
48
50
49
51
.array 0
50
52
@@ -162,6 +164,20 @@ namespace CodeGen.Engine
162
164
currentFileNode = node
163
165
Visit(node.Body)
164
166
167
+
;; Does the template require a specific version of CodeGen?
168
+
if (node.RequiredCodeGenVersion != ^null)
169
+
begin
170
+
data codeGenVersion = Version.Parse(FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion)
171
+
if (node.RequiredCodeGenVersion > codeGenVersion)
172
+
begin
173
+
;;Strip off the last component of the assembly version number
174
+
data versionString = codeGenVersion.ToString().Substring(0,codeGenVersion.ToString().LastIndexOf("."))
175
+
;;Display the error
176
+
data message = String.Format("Template {0} requires a CodeGen {1} or higher. You are running version {2}.", node.Context.CurrentTemplateBaseName,node.RequiredCodeGenVersion.ToString(), versionString)
0 commit comments