Skip to content

Commit

Permalink
Merge pull request pascalabcnet#3035 from samuraiGH/TargetFramework-r…
Browse files Browse the repository at this point in the history
…epair

Repair TargetFramework directive
  • Loading branch information
ibond84 authored Feb 1, 2024
2 parents e17dd66 + 8b97113 commit 5496eb1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Compiler/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2005,14 +2005,14 @@ private void SetOutputPlatformOption(NETGenerator.CompilerOptions compilerOption
}
if (CompilerOptions.Only32Bit)
compilerOptions.platformtarget = NETGenerator.CompilerOptions.PlatformTarget.x86;

// целевой framework
if (this.compilerDirectives.TryGetValue(TreeConverter.compiler_string_consts.compiler_directive_targetframework, out compilerDirectivesList))
}
if (compilerDirectives.TryGetValue(TreeConverter.compiler_string_consts.compiler_directive_targetframework, out compilerDirectivesList))
{
compilerOptions.TargetFramework = compilerDirectivesList[0].directive;
if (!(new string[] { "net40", "net403", "net45", "net451", "net452", "net46", "net461", "net462", "net47", "net471", "net472", "net48", "net481" })
.Contains(compilerOptions.TargetFramework))
{
compilerOptions.TargetFramework = compilerDirectivesList[0].directive;
if (!(new string[] { "net40", "net403", "net45", "net451", "net452", "net46", "net461", "net462", "net47", "net471", "net472", "net48", "net481" })
.Contains(compilerOptions.TargetFramework))
ErrorsList.Add(new UnsupportedTargetFramework(compilerOptions.TargetFramework, compilerDirectivesList[0].location));
ErrorsList.Add(new UnsupportedTargetFramework(compilerOptions.TargetFramework, compilerDirectivesList[0].location));
}
}
}
Expand Down Expand Up @@ -2329,7 +2329,7 @@ private void PrebuildMainSemanticTreeActions(out NETGenerator.CompilerOptions co

compilerOptions = new NETGenerator.CompilerOptions();

// выяснение целевой платформы
// выяснение TargetFramework и целевой платформы
SetOutputPlatformOption(compilerOptions);

// остальные директивы
Expand Down

0 comments on commit 5496eb1

Please sign in to comment.