Skip to content

Commit 7661ff6

Browse files
[Csharp Extension] Removal of PDB Files from C# Extension Release Build (#47)
* C# pdb * Resolve Comments
1 parent 9c99140 commit 7661ff6

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

language-extensions/dotnet-core-CSharp/build/windows/create-dotnet-core-CSharp-extension-zip.cmd

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,25 @@ SET BUILD_OUTPUT=%DOTNET_EXTENSION_WORKING_DIR%\%BUILD_CONFIGURATION%
2121
MKDIR %BUILD_OUTPUT%\packages
2222

2323
REM Delete the ref folder so that the zip can be loaded by the SPEES
24+
REM
2425
RD /S /Q %BUILD_OUTPUT%\ref
2526
POPD
2627

28+
REM Define files to compress, conditionally including .pdb files if BUILD_CONFIGURATION is "debug"
29+
REM
30+
SET FILES_TO_COMPRESS=%BUILD_OUTPUT%\*.dll, %BUILD_OUTPUT%\Microsoft.SqlServer.CSharpExtension.runtimeconfig.json, %BUILD_OUTPUT%\Microsoft.SqlServer.CSharpExtension.deps.json
31+
IF /I "%BUILD_CONFIGURATION%"=="debug" (SET FILES_TO_COMPRESS=%FILES_TO_COMPRESS%, %BUILD_OUTPUT%\*.pdb)
32+
2733
REM Package the signed binaries.
2834
REM
2935
powershell -NoProfile -ExecutionPolicy Unrestricted ^
30-
-Command "Compress-Archive -Force -Path %BUILD_OUTPUT%\*.dll, %BUILD_OUTPUT%\*.pdb, `" ^
31-
"%BUILD_OUTPUT%\Microsoft.SqlServer.CSharpExtension.runtimeconfig.json, `" ^
32-
"%BUILD_OUTPUT%\Microsoft.SqlServer.CSharpExtension.deps.json `" ^
36+
-Command "Compress-Archive -Force -Path %FILES_TO_COMPRESS%" ^
3337
"-DestinationPath %BUILD_OUTPUT%\packages\dotnet-core-CSharp-lang-extension.zip"
3438
CALL :CHECKERROR %ERRORLEVEL% "Error: Failed to create zip for dotnet-core-CSharp-extension for configuration=%BUILD_CONFIGURATION%" || EXIT /b %ERRORLEVEL%
3539

3640
ECHO "Success: Compressed dotnet-core-CSharp-extension for %BUILD_CONFIGURATION% configuration."
3741

38-
REM REM Advance arg passed to create-dotnet-core-CSharp-extension-zip.cmd
42+
REM Advance arg passed to create-dotnet-core-CSharp-extension-zip.cmd
3943
REM
4044
SHIFT
4145
REM Continue building using more configs until argv has been exhausted
@@ -45,8 +49,8 @@ IF NOT "%~1"=="" GOTO LOOP
4549
EXIT /b %ERRORLEVEL%
4650

4751
:CHECKERROR
48-
IF %1 NEQ 0 (
49-
ECHO %2
50-
EXIT /b %1
51-
)
52-
EXIT /b 0
52+
IF %1 NEQ 0 (
53+
ECHO %2
54+
EXIT /b %1
55+
)
56+
EXIT /b 0

0 commit comments

Comments
 (0)