CSharp preprocessor definitions

This commit is contained in:
Oiltanker
2022-04-25 17:55:53 +03:00
parent 370c0e3288
commit 6a23dece35
3 changed files with 6 additions and 11 deletions
@@ -55,7 +55,7 @@ namespace Barotrauma
try
{
code = ToOneTimeScript(code);
var syntaxTree = SyntaxFactory.ParseSyntaxTree(code, CSharpParseOptions.Default.WithPreprocessorSymbols(PreprocessingSymbols));
var syntaxTree = SyntaxFactory.ParseSyntaxTree(code, ParseOptions);
var compilation = CSharpCompilation.Create(NET_ONE_TIME_SCRIPT_ASSEMBLY, new[] { AssemblyInfoSyntaxTree(NET_ONE_TIME_SCRIPT_ASSEMBLY), syntaxTree }, defaultReferences, compileOptions);
Assembly assembly = null;