Skip to content

Commit

Permalink
- Issue #278: Support for embedded PDBs? Merged PR #279
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-shilo committed Feb 14, 2022
1 parent 780a5b0 commit 5e0f3c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 5 additions & 9 deletions src/CSScriptLib/src/CSScriptLib/CSScriptLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>4.4.0.0</Version>
<Version>4.4.1.0</Version>
<Authors>Oleg Shilo</Authors>
<Description>CS-Script engine Class Library for .NET 5</Description>
<Description>CS-Script engine Class Library for .NET 5 (and higher)</Description>
<Copyright>(C) 2018-2022 Oleg Shilo</Copyright>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageProjectUrl>https://github.com/oleg-shilo/cs-script</PackageProjectUrl>
Expand All @@ -34,11 +34,7 @@ repo=https://github.com/oleg-shilo/cs-script/releases/download/v4.4.0.0/; file=c
_**Windows (choco)**_
_Pending approval_
```
choco install cs-script --version=4.4.0.0
```
It is highly recommended that you uninstall CS-Script.Core:
```
sudo choco uninstall cs-script.core
sudo choco install cs-script --version=4.4.0.0
```

_**Manual**_
Expand Down Expand Up @@ -67,8 +63,8 @@ The same shim/symbolic link is created if you are installing the CS-Script as a
- Issue #278: Support for embedded PDB?
- Added setting PDB format via `CSScript.EvaluatorConfig.PdbFormat`</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<AssemblyVersion>4.4.0.0</AssemblyVersion>
<FileVersion>4.4.0.0</FileVersion>
<AssemblyVersion>4.4.1.0</AssemblyVersion>
<FileVersion>4.4.1.0</FileVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>css_logo.png</PackageIcon>
</PropertyGroup>
Expand Down
12 changes: 8 additions & 4 deletions src/CSScriptLib/src/CSScriptLib/Evaluator.Roslyn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,14 @@ void add_code(string file, string[] codeLines, int lineOffset)
var emitOptions = new EmitOptions(false, CSScript.EvaluatorConfig.PdbFormat);

EmitResult result;
if (IsDebug && CSScript.EvaluatorConfig.PdbFormat == DebugInformationFormat.Embedded)
result = compilation.Emit(asm, options: emitOptions);
else if (IsDebug)
result = compilation.Emit(asm, pdb, options: emitOptions);

if (IsDebug)
{
if (CSScript.EvaluatorConfig.PdbFormat == DebugInformationFormat.Embedded)
result = compilation.Emit(asm, options: emitOptions);
else
result = compilation.Emit(asm, pdb, options: emitOptions);
}
else
result = compilation.Emit(asm);

Expand Down

0 comments on commit 5e0f3c6

Please sign in to comment.