Showing posts with label version. Show all posts
Showing posts with label version. Show all posts

Tuesday, 12 January 2010

VSS Batch File Apply Patched Files

Below is an example of how I get a base version of my files in VSS and then apply (overwrite) any other files that are in the patch for that version.

My batch file takes 3 arguments:
1. SSDIR
2. Base label
3. Patch label

Here is an example of calling the batch file GetPatch.bat:

"C:\Documents and Settings\shane\Desktop\GetPatch.bat" \\myVSS\Sourcesafe "v0.0.1" "v0.0.1 Patch 4"

Note your label must start with a leter i.e. v0.0.1 in order for the version to be picked up.

Another thing to note is you must go into VSS and click on Tools > Options and then tick the option "Act on projects recursively".

GetPatch.bat
------------

@ECHO OFF
CLS
ECHO Arguments
ECHO =========
ECHO.
ECHO 1. SSIDR: %~1
ECHO 2. Base label: %~2
ECHO 2. Patch label: %~3
ECHO.

IF "%~1"=="" GOTO ArgumentInvalid
IF "%~2"=="" GOTO ArgumentInvalid
IF "%~3"=="" GOTO ArgumentInvalid

SET SSDIR=%~1
ECHO Getting base files for label "%~2". Please be patient this will take a few minutes.
"C:\Program Files\Microsoft Visual SourceSafe\SS.exe" GET $/VSSProject/Project1/*.* -GF -VL"%~2"
ECHO Getting patch files for label "%~3". Please be patient this will take a few minutes.
"C:\Program Files\Microsoft Visual SourceSafe\SS.exe" GET $/VSSProject/Project1/*.* -GF -VL"%~3"

ECHO.
ECHO Done
GOTO Exit

:ArgumentInvalid
ECHO Missing arguments. Not able to continue.

:Exit
ECHO.
PAUSE

Monday, 24 November 2008

Point old dll versions to newer versions in web.config

The following web.config entry was giving me an error stating it could not find the dll:

<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />

The reason for it missing is because System.Web.Extensions.Design is now in the GAC with .NET 3.5 and it can not find version 1.0.61025.0.

To fix this I placed the following config entry which routes any old dll to the new dll:

<runtime>

<dependentAssembly>

<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>

dependentAssembly>

assemblyBinding>

runtime>

Make sure it is below the ConfigSections.