Getting Nant + nantcontrib. And write following script:
<target name="GetLastVersion">
<!–here get last version into $projectdir–>
</target>
<target name="VssAddFiles">
<fileset basedir="${projectdir}" id="ServerFiles">
<include name="**\*.*"/>
<exclude name="**\*.vspscc"/>
<exclude name="**\*.vssscc"/>
<exclude name="**\*.scc"/>
<exclude name="**\*.vss"/>
<exclude name="**\*.suo"/>
<exclude name="**\*.resharper.user"/>
<exclude name="**\*.resharper"/>
</fileset>
<foreach item="File" property="serverFile">
<in>
<items refid="ServerFiles"/>
</in>
<do>
<property name="localFile"
value="${string::replace(serverFile, projectdir, tempDir)}" />
<property name="currentFolder"
value="${path::get-directory-name(serverFile)}" />
<property name="vssPath"
value="${string::replace(string::replace(currentFolder, projectdir,
LocalVSSPath), ‘\’, ‘/’)}" />
<if test=
"${not file::exists(localFile)
and not string::contains(localFile, ‘\obj\’)
and not string::contains(localFile, ‘\bin\’)
and not string::contains(localFile, ‘\bin\’)
and not string::contains(localFile, ‘\build\’)
and not string::contains(localFile, [...]