Microsoft MVP성태의 닷넷 이야기
VS.NET IDE: 84. Visual Studio를 이용한 파일 비교(diff) [링크 복사], [링크+제목 복사],
조회: 31477
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

Visual Studio를 이용한 파일 비교(diff)

windiff 등의 도구도 있지만 Visual Studio 자체로도 파일 비교를 할 수 있습니다.

Compare two files in Visual Studio 2012
; http://stackoverflow.com/questions/13752998/compare-two-files-in-visual-studio-2012

명령행을 통해서 이렇게 할 수도 있고,

c:\temp>devenv.exe /diff test1.txt test2.txt 

Visual Studio 내에서 명령창(Command Window: 단축키 Ctrl+Alt+A)을 띄워 다음과 같이 실행할 수도 있습니다.

Tools.DiffFiles c:\temp\test1.txt c:\temp\test2.txt 

그런데, 간혹 다음과 같은 오류를 내며 파일 비교가 안되는 경우가 있습니다.

The following files were specified on the command line:

test1.txt

test2.txt

These files could not be opened to do the comparison and will not be loaded.

제가 겪은 바로는 이런 경우 딱 2가지 상황이었습니다. 비교하려는 파일명이 틀렸거나, 아니면 유니코드(Unicode: Codepage 1200)로 인코딩된 파일 중에 규칙을 알 수 없는 상황에서 간혹 발생했습니다. 이런 경우 이 파일을 UTF-8이나 그 외 ANSI 코드 페이지로 바꿔주면 정상적으로 비교가 됩니다. (후자의 경우 파일 인코딩이 불편하면 windiff.exe 등을 이용해 비교해 주시면 됩니다.)




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







[최초 등록일: ]
[최종 수정일: 1/14/2014]

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

비밀번호

댓글 작성자
 




... 151  [152]  153  154  155  156  157  158  159  160  161  162  163  164  165  ...
NoWriterDateCnt.TitleFile(s)
1283정성태5/12/201234529.NET Framework: 317. C# 관점에서의 Observer 패턴 구현 [1]파일 다운로드1
1282정성태5/12/201227242Phone: 6. Windows Phone 7 Silverlight에서 Google Map 사용하는 방법 [3]파일 다운로드1
1281정성태5/9/201234287.NET Framework: 316. WPF/Silverlight의 그래픽 단위와 Anti-aliasing 처리를 이해하자 [1]파일 다운로드1
1280정성태5/9/201227414오류 유형: 154. Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, ...'.
1279정성태5/9/201226182.NET Framework: 315. 해당 DLL이 Managed인지 / Unmanaged인지 확인하는 방법 [1]파일 다운로드1
1278정성태5/8/201227553오류 유형: 153. Visual Studio 디버깅 - Unable to break execution. This process is not currently executing the type of code that you selected to debug.
1277정성태5/8/201232511오류 유형: 152. cmd.exe - The system cannot write to the specified device. [2]
1276정성태4/28/201224383Phone: 5. 모든 Marketplace에 윈폰 앱을 등록하는 방법 [1]
1275정성태4/28/201227975개발 환경 구성: 150. 프로세스 실행으로 잠긴 파일이지만, 이름은 변경가능하다는 사실! 아셨나요? [7]
1274정성태4/17/201222655Phone: 4. "Holiday Calendar" 윈폰 응용 프로그램 등록
1273정성태4/6/201226090Phone: 3. 윈도우 폰을 위한 Holiyday Calendar 앱 개발파일 다운로드1
1272정성태4/5/201227222오류 유형: 151. ASP.NET - EcbGetUnicodeServerVariables 코드에서 System.AccessViolationException 예외 발생
1271정성태4/3/201229724Math: 6. 동전을 여러 더미로 나누는 경우의 수 세기 [1]
1270정성태3/29/201224199오류 유형: 150. Visual Studio 2010 원격 디버깅 오류 - Kerberos authentication failed
1269정성태3/27/201238165오류 유형: 149. ODP.NET 오류 - The provider is not compatible with the version of Oracle client
1268정성태3/27/201234446오류 유형: 148. WCF svc 호출 시 HTTP Error 404.17 - Not Found [1]
1267정성태3/16/201232612.NET Framework: 314. C++의 inline asm 사용을 .NET으로 포팅하는 방법 [1]파일 다운로드1
1266정성태3/14/201235702개발 환경 구성: 149. RAID 1 구성 시 하드 디스크 장애 발생 해결에 대한 경험담
1265정성태3/13/201225958VC++: 61. 아이태니엄(IA64: Itanium) 에서 겪은 C++ 포인터 연산 문제 [2]
1264정성태3/10/201245463.NET Framework: 313. WELL512 난수 발생 알고리즘 - C# [5]파일 다운로드1
1263정성태3/9/201224133개발 환경 구성: 148. tinyget 사용법
1262정성태3/8/201245024개발 환경 구성: 147. .keystore 파일에 저장된 개인키 추출 방법과 인증기관으로부터 온 공개키를 합친 pfx 파일 만드는 방법 [1]
1261정성태3/7/201225620Phone: 2. 개발자용 윈도우 폰 7 기기 등록하는 방법
1260정성태3/6/201225733Phone: 1. 윈도폰 7 개발자 (회사) 등록하는 방법 [3]
1259정성태3/4/201237194Windows: 57. 새로 추가된 네트워크 커널 디버깅 및 PowerShell 3.0 [1]
1258정성태3/3/201238777개발 환경 구성: 146. SQL Server 2012에 포함된 LocalDB 기능 소개 [3]파일 다운로드1
... 151  [152]  153  154  155  156  157  158  159  160  161  162  163  164  165  ...