anchor.diff:  	echo 	^<DebuggerFlavor^>WindowsLocalDebugger^</DebuggerFlavor^> >> %1
   	echo   ^</PropertyGroup^> >> %1
   	echo   ^<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"^> >> %1
  +	echo 	^<LocalDebuggerWorkingDirectory^>%PROJECT_ROOT_DIR%release^</LocalDebuggerWorkingDirectory^> >> %1
  +	echo 	^<DebuggerFlavor^>WindowsLocalDebugger^</DebuggerFlavor^> >> %1
  +	echo   ^</PropertyGroup^> >> %1
  +	echo   ^<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'"^> >> %1
   	echo 	^<LocalDebuggerWorkingDirectory^>%PROJECT_ROOT_DIR%release^</LocalDebuggerWorkingDirectory^> >> %1
   	echo 	^<DebuggerFlavor^>WindowsLocalDebugger^</DebuggerFlavor^> >> %1
   	echo   ^</PropertyGroup^> >> %1
  
positive.code: 	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "%CURRENT_PATH%source" "%PROJECT_ROOT_DIR%source"
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj.filters" "%CURRENT_PATH%source" "%PROJECT_ROOT_DIR%source"
  	:: replace release and debug paths
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "%CURRENT_PATH%%PVPGN_BUILD%\src\%1\Debug" "%PROJECT_ROOT_DIR%release"
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "%CURRENT_PATH%%PVPGN_BUILD%\src\%1\Release" "%PROJECT_ROOT_DIR%release"
  	:: replace unix like build path
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "%CURRENT_PATH_BACKSLASH%%PVPGN_BUILD%/src/%1" "../%2"
  	:: replace path for magic builder module 
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "%CURRENT_PATH%module" "%PROJECT_ROOT_DIR%module"
  	:: replace new path in pvpgn.sln
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%pvpgn.sln" "src\%1\%2" "projects\%2\%2"
  	
  	:: libs now build into release
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "..\common\Debug\common.lib" "%PROJECT_ROOT_DIR%release\common.lib"
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "..\compat\Debug\compat.lib" "%PROJECT_ROOT_DIR%release\compat.lib"
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "..\tinycdb\Debug\tinycdb.lib" "%PROJECT_ROOT_DIR%release\tinycdb.lib"
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "..\win32\Debug\win32.lib" "%PROJECT_ROOT_DIR%release\win32.lib"
  	:: this replacement only for bncdb project
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "Debug\tinycdb.lib" "%PROJECT_ROOT_DIR%release\tinycdb.lib"
  	@call %TOOLS_PATH%replacer.bat "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" "Release\tinycdb.lib" "%PROJECT_ROOT_DIR%release\tinycdb.lib"
  
  	:: remove reduntant cmake node that executes cmake.exe on each build
  	call :remove_xml_node "%PVPGN_DEVKIT%projects\%2\%2.vcxproj" Project/ItemGroup/CustomBuild
  
negative.code: copy /Y "%PVPGN_BUILD%\pvpgn.sln" "%PVPGN_DEVKIT%\"
  
  :: build each project
  call :build_project src\bnetd bnetd
  call :build_project src\bnpass bnpass
  call :build_project src\bnpass sha1hash
  call :build_project src\bntrackd bntrackd
  call :build_project src\bniutils bni2tga
  call :build_project src\bniutils bnibuild
  call :build_project src\bniutils bniextract
  call :build_project src\bniutils bnilist
  call :build_project src\bniutils tgainfo
  call :build_project src\common common
  call :build_project src\compat compat
  call :build_project src\client bnbot
  call :build_project src\client bnchat
  call :build_project src\client bnftp
  call :build_project src\client bnstat
  call :build_project src\d2cs d2cs
  call :build_project src\d2dbs d2dbs
  call :build_project src\win32 win32
  call :build_project lib\fmt fmt
  
  
  :: remove unused projects generated by cmake
  