forked from DataDog/dd-trace-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpre-build-events-cpp.bat
More file actions
21 lines (16 loc) · 880 Bytes
/
pre-build-events-cpp.bat
File metadata and controls
21 lines (16 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
REM This batch file moves locked outputs (dll/pdb/xml) so as not to block the local build process.
REM The corprofiler dlls get locked up when running the samples against iisexpress.exe for example
REM This is to fix the need to close Visual Studio, manually kill a VBCSCompiler.exe process, delete a dll, then restart Visual Studio
echo PreBuildEvents
echo $(TargetPath) is %1
echo $(TargetFileName) is %2
echo $(TargetDir) is %3
echo $(TargetName) is %4
set dir=%3%LockedAssemblies
if not exist %dir% (mkdir %dir%)
REM delete all assemblies not really locked by a process
del "%dir%\*" /q
REM assembly file (.exe / .dll) - .pdb file - eventually .xml file (documentation) are concerned
if exist "%1" move "%1" "%dir%\%2.locked.%random%"
if exist "%3%4.pdb" move "%3%4.pdb" "%dir%\%4.pdb.locked%random%"
if exist "%3%4.xml.locked" del "%dir%\%4.xml.locked%random%"