diff --git a/.gitignore b/.gitignore
index 272047aef..87b275052 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,5 @@ bin/
*.user
*.tgz
test-results/
-debug.log
\ No newline at end of file
+debug.log
+src/generated/VersionInfo.ts
\ No newline at end of file
diff --git a/src.compiler/csharp/CSharpAstTransformer.ts b/src.compiler/csharp/CSharpAstTransformer.ts
index 9def7d374..0f75ab0ec 100644
--- a/src.compiler/csharp/CSharpAstTransformer.ts
+++ b/src.compiler/csharp/CSharpAstTransformer.ts
@@ -182,7 +182,7 @@ export default class CSharpAstTransformer {
this._context.addTsNodeDiagnostics(
p,
'Unsupported export',
- ts.DiagnosticCategory.Error
+ ts.DiagnosticCategory.Message
);
}
});
@@ -191,7 +191,7 @@ export default class CSharpAstTransformer {
this._context.addTsNodeDiagnostics(
d,
'Unsupported export',
- ts.DiagnosticCategory.Error
+ ts.DiagnosticCategory.Message
);
}
})
diff --git a/src.compiler/typescript/AlphaTabGenerator.ts b/src.compiler/typescript/AlphaTabGenerator.ts
index 9afea6cff..6fac28aa0 100644
--- a/src.compiler/typescript/AlphaTabGenerator.ts
+++ b/src.compiler/typescript/AlphaTabGenerator.ts
@@ -1,7 +1,9 @@
import * as ts from 'typescript';
import cloneEmit from './CloneEmitter';
import serializerEmit from './SerializerEmitter';
-import transpiler from '../TranspilerBase'
+import transpiler from '../TranspilerBase';
+import * as path from 'path';
+import * as fs from 'fs';
transpiler([{
name: 'Clone',
@@ -11,4 +13,16 @@ transpiler([{
emit: serializerEmit
}]);
+// Write version file
+import { version } from '../../package.json';
+const fileHandle = fs.openSync('src/generated/VersionInfo.ts', 'w');
+fs.writeSync(fileHandle, '// \n');
+fs.writeSync(fileHandle, '// This code was auto-generated.\n');
+fs.writeSync(fileHandle, '// Changes to this file may cause incorrect behavior and will be lost if\n');
+fs.writeSync(fileHandle, '// the code is regenerated.\n');
+fs.writeSync(fileHandle, '// \n');
+fs.writeSync(fileHandle, 'export class VersionInfo {\n');
+fs.writeSync(fileHandle, ` public static readonly version:string = '${version}';\n`);
+fs.writeSync(fileHandle, ` public static readonly date:string = '${new Date().toISOString()}';\n`);
+fs.writeSync(fileHandle, '}\n');
ts.sys.exit(ts.ExitStatus.Success);
\ No newline at end of file
diff --git a/src.csharp/AlphaTab.Windows/WinForms/AlphaTabControl.cs b/src.csharp/AlphaTab.Windows/WinForms/AlphaTabControl.cs
index 580c145df..d98831391 100644
--- a/src.csharp/AlphaTab.Windows/WinForms/AlphaTabControl.cs
+++ b/src.csharp/AlphaTab.Windows/WinForms/AlphaTabControl.cs
@@ -54,7 +54,7 @@ public IEnumerable