Visual Studio로 클론 코딩을 하다 보면 다운 받은 자료와 내가 새로 만든 프로젝트의 설정 값이 다른 경우가 발생한다.
Direct X 11의 경우 제일 많이 발생하는게 Linker 오류와 Vertex Shader, Pixel Shader의 타입과 모델을 지정해주지 않아서 발생하는 HLSL 컴파일 오류이다.
물론 stackoverflow같은 커뮤니티를 통해 해결할 수 있지만 가장 원초적이면서 빠른 방법은 Visual Studio의 설정값을 비교하여 내 프로젝트의 설정값을 채워주는 것이다.
Project Property 파일은 .vcxproj 확장자를 가진다.
이 파일을 비교하여 내 프로젝트 프로퍼티 파일을 수정해보자.
1. Diff 설치
Visual Code - Extensions에서 Diff를 검색하여 설치하고 Reload 한다.
2. 두 파일 불러오기
비교할 두 vcxproj 파일을 불러온다.
vcxproj 파일은 다른 폴더에 존재하기 때문에 비교할 두 파일 다 Visual Code에 불러온다.
3. Diff: File
명령어 팔레트(Ctrl + Shift + P) 또는 상단 바 누르고 >를 입력해서
Diff: File 명령어를 실행한다.
그리고 다음으로 비교할 파일의 이름을 입력한다. 참고로 같은 폴더에 있지 않은 파일은 위에서 설명한 것처럼 Visual Code에 불러와야 찾을 수 있다.
4. 파일 비교
이렇게 마치 git에서 충돌나는 파일을 처리하는 것처럼 두 파일의 코드를 비교할 수 있다.
참고로 Diff Folders 라는 툴도 있는데 이건 폴더 단위로 파일들을 통째로 가져와서 비교한다.
'Tips' 카테고리의 다른 글
clang-format) 자주 사용하는 옵션들 정리 (0) | 2024.02.28 |
---|