Microsoft MVP성태의 닷넷 이야기
Team Foundation Server: 37. TFS 2010의 소스 서버 수작업 구성 [링크 복사], [링크+제목 복사],
조회: 19109
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 2개 있습니다.)
TFS 2010의 소스 서버 수작업 구성


예전 글에서, 소스 서버를 TFS 2008에 연동하는 방법과 효과를 설명해 드린 적이 있는데요.

TFS Team Build + Source Server = 소스 코드 디버깅
; https://www.sysnet.pe.kr/2/0/600

TFS Team Build + Symbol Server
; https://www.sysnet.pe.kr/2/0/599

Symbol Server 생성
; https://www.sysnet.pe.kr/2/0/323

TFS 2010에서 좋은 소식이 있다면 TFS 2008에 비해 자동화된 구성이 가능합니다.

Enabling Symbol and Source Server Support in TFS Build 2010 Beta 1
; http://blogs.msdn.com/b/jimlamb/archive/2009/06/15/enabling-symbol-and-source-server-support-in-tfs-build-2010-beta-1.aspx

그런데, 팀 빌드가 아닌 수작업 배치파일(.bat)에서 돌려야 할 필요가 있어서 그때의 TFS 2008 구성을 가지고 배치로 바꿔보았는데요.

ssindex.cmd 실행 부분에서 자꾸만 다음과 같은 오류가 발생합니다.

ssindex -SYSTEM=TFS -SYMBOLS="D:\...\bin" -SOURCE="D:\...\"
--------------------------------------------------------------------------------
ssindex.cmd [STATUS] : Server ini file: C:\Program Files (x86)\Debugging Tools for Windows (x86)\srcsrv\srcsrv.ini
ssindex.cmd [STATUS] : Source root    : D:\...
ssindex.cmd [STATUS] : Symbols root   : D:\...\bin
ssindex.cmd [STATUS] : Control system : TFS
ssindex.cmd [STATUS] : TFS program name: tf.exe
ssindex.cmd [STATUS] : TFS Label      : <N/A>
ssindex.cmd [STATUS] : Old path root  : <N/A>
ssindex.cmd [STATUS] : New path root  : <N/A>
--------------------------------------------------------------------------------

ssindex.cmd [STATUS] : Running... this will take some time...
ssindex.cmd [STATUS] : Server name not returned by tf.exe info for D:\...\.Skipping all files in the working folder.

예전에도 "Server name not returned by tf.exe" 오류를 겪은 적이 있었는데요.

소스 서버 구성, 그 외의 이야기
; https://www.sysnet.pe.kr/2/0/603

위의 경우에는 ActivePerl 설치 과정 중에 PATH가 잘못 잡혀서 발생했던 것에 반해, 이번에는 모든 경로가 정상적으로 잡혀있는데도 그와 같은 오류가 발생했습니다.

휴~~~ 한숨 먼저 짓고. 배워본 적도 없는 Perl 소스 코드를 이렇게 해서 또 뒤집어 보는 군요. ^^;

"C:\Program Files (x86)\Debugging Tools for Windows (x86)\srcsrv" 폴더에 있는 "tfs.pm"을 메모장으로 열어서 다음과 같은 코드를 찾아냈습니다.

$hProc = ExecTFSCmd($self, $SourceRoot, "workfold");

while (<$hProc>)
{

    chomp;
    if (m/Server\s+:\s+(.*)/i)
    {
        $PreferredServer = $1;
    }
}

close($hProc);

# Confirm the results.

if ( defined $PreferredServer )
{
    $Server = $PreferredServer;
}

if ( ! defined $Server )
{
    ::status_message("Server name not returned by $$self{'TFS_CMD'} info for $SourceRoot.".
                        "Skipping all files in the working folder.");
    return;
}

while 문 사이에다가 "print $_;" 코드를 넣어서 살펴보니, 정상적으로 "tf.exe workfold"가 실행되었다는 것과 그 콘솔 출력 내용이 올바르다는 것이 확인되었습니다. 그런데, 왜? $PreferredServer 변수에는 아무런 값이 안 들어오는 것인지...? ^^;

가만히 살펴보다가 음... "m/Server:\s+(.*)/i" 정규 표현식 잘못임을 알게되었습니다. 실제 tf.exe workfold의 출력문은 다음과 같은데,

D:\...>tf workfold
===============================================================================
Workspace : MYPC (TESTDOMAIN\MyUser)
Collection: http://mypc:8080/tfs/defaultcollection
 $/TestSolution: D:\...

아하~~~ TFS 2010부터 Collection이 지원되면서 예전 "Server :" 자리에 "Collection:"이 대체하고 있었기 때문에 정규표현식에서 못 걸러낸 것입니다. (애초부터, 그냥 웹 서비스를 호출했으면 좋았지 않았을까요?)

그래서, 결국 tfs.pm에 들어있는 Perl 코드를 다음과 같이 변경해 주면 TFS 2010에서도 정상적으로 소스 코드 인덱싱이 됩니다.

[TFS 2008 용 tfs.pm 파일 내용]
while (<$hProc>)
{
    chomp;
    if (m/Server\s+:\s+(.*)/i)
    {
        $PreferredServer = $1;
    }
}

==>

[TFS 2010 용 tfs.pm 파일 내용]
while (<$hProc>)
{
    chomp;
    if (m/Collection:\s+(.*)/i)
    {
        $PreferredServer = $1;
    }
}




[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 6/18/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 16  17  18  19  20  21  22  23  24  25  26  27  [28]  29  30  ...
NoWriterDateCnt.TitleFile(s)
12950정성태2/1/20226723.NET Framework: 1146. .NET 6에 추가되지 않은 Generic Math (예: INumber<T>)
12949정성태2/1/20226574.NET Framework: 1145. C# - ffmpeg(FFmpeg.AutoGen) - Codec 정보 열람 및 사용 준비파일 다운로드1
12948정성태1/30/20226718.NET Framework: 1144. C# - ffmpeg(FFmpeg.AutoGen) AVFormatContext를 이용해 ffprobe처럼 정보 출력파일 다운로드1
12947정성태1/30/20227887개발 환경 구성: 634. ffmpeg.exe - 기존 동영상 컨테이너에 다중 스트림을 추가하는 방법
12946정성태1/28/20226372오류 유형: 792. .NET Core - 로컬 개발 중에 docker 호스팅으로 바꾸는 경우 SQL 서버 접근 방법
12945정성태1/28/20226683오류 유형: 791. SQL 서버 로그인 시 localhost는 되고, 127.0.0.1로는 안 되는 문제
12944정성태1/28/20229139.NET Framework: 1143. C# - Entity Framework Core 6 개요
12943정성태1/27/20227954.NET Framework: 1142. .NET 5+로 포팅 시 플랫폼 호환성 경고 메시지(SYSLIB0006, SYSLIB0011, CA1416)파일 다운로드1
12942정성태1/27/20228210.NET Framework: 1141. XmlSerializer와 Dictionary 타입파일 다운로드1
12941정성태1/26/20229640오류 유형: 790. AKS/k8s - pod 상태가 Pending으로 지속되는 경우
12940정성태1/26/20226957오류 유형: 789. AKS에서 hpa에 따른 autoscale 기능이 동작하지 않는다면?
12939정성태1/25/20227738.NET Framework: 1140. C# - ffmpeg(FFmpeg.AutoGen)를 이용해 MP3 오디오 파일 인코딩/디코딩하는 예제파일 다운로드1
12938정성태1/24/202210076개발 환경 구성: 633. Docker Desktop + k8s 환경에서 local 이미지를 사용하는 방법
12937정성태1/24/20227914.NET Framework: 1139. C# - ffmpeg(FFmpeg.AutoGen)를 이용해 오디오(mp2) 인코딩하는 예제(encode_audio.c) [2]파일 다운로드1
12936정성태1/22/20227855.NET Framework: 1138. C# - ffmpeg(FFmpeg.AutoGen)를 이용해 멀티미디어 파일의 메타데이터를 보여주는 예제(metadata.c)파일 다운로드1
12935정성태1/22/20228085.NET Framework: 1137. ffmpeg의 파일 해시 예제(ffhash.c)를 C#으로 포팅파일 다운로드1
12934정성태1/22/20227653오류 유형: 788. Warning C6262 Function uses '65564' bytes of stack: exceeds /analyze:stacksize '16384'. Consider moving some data to heap. [2]
12933정성태1/21/20228148.NET Framework: 1136. C# - ffmpeg(FFmpeg.AutoGen)를 이용해 MP2 오디오 파일 디코딩 예제(decode_audio.c)파일 다운로드1
12932정성태1/20/20228614.NET Framework: 1135. C# - ffmpeg(FFmpeg.AutoGen)로 하드웨어 가속기를 이용한 비디오 디코딩 예제(hw_decode.c) [2]파일 다운로드1
12931정성태1/20/20226628개발 환경 구성: 632. ASP.NET Core 프로젝트를 AKS/k8s에 올리는 과정
12930정성태1/19/20227385개발 환경 구성: 631. AKS/k8s의 Volume에 파일 복사하는 방법
12929정성태1/19/20227187개발 환경 구성: 630. AKS/k8s의 Pod에 Volume 연결하는 방법
12928정성태1/18/20227274개발 환경 구성: 629. AKS/Kubernetes에서 호스팅 중인 pod에 shell(/bin/bash)로 진입하는 방법
12927정성태1/18/20227033개발 환경 구성: 628. AKS 환경에 응용 프로그램 배포 방법
12926정성태1/17/20227585오류 유형: 787. AKS - pod 배포 시 ErrImagePull/ImagePullBackOff 오류
12925정성태1/17/20227606개발 환경 구성: 627. AKS의 준비 단계 - ACR(Azure Container Registry)에 docker 이미지 배포
... 16  17  18  19  20  21  22  23  24  25  26  27  [28]  29  30  ...