Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

error MSB8008: Specified platform toolset (v120) is not installed or invalid.

msbuild로 컴파일할 때 다음과 같은 오류가 발생한다면?

D:\Sources>msbuild ".\filer.vcxproj" /p:Platform=Win32;Configuration=Release /t:Rebuild
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34003]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 2013-11-27 오후 1:17:27.
Project "D:\Sources\filer.vcxproj" on node 1 (Rebuild target(s)).
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5): error MSB8008: Specified platform toolset (v120) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.
[D:\Sources\filer.vcxproj] Done Building Project "D:\Sources\filer.vcxproj" (Rebuild target(s)) -- FAILED.

Build FAILED.


해당 머신에 Visual Studio 2013이 설치되어 있지 않기 때문입니다. 만약 설치되어 있는데도 여전히 발생한다면? 다음의 글에서 알려주듯이,

Specified platform toolset (v110) is not installed or invalid:
; http://social.msdn.microsoft.com/Forums/vstudio/en-US/09e51771-c6dd-4049-a73c-622aa3e6b67d/specified-platform-toolset-v110-is-not-installed-or-invalid

VisualStudioVersion 환경 변수가 정의되어 있지 않기 때문입니다. 따라서, msbuild 명령행 빌드를 실행하기 전 다음과 같이 환경 변수를 설정해 주시면 됩니다.

set VisualStudioVersion=12.0

그런데 이런 오류가 발생할 수도 있습니다.

D:\Sources>msbuild ".\Sources\filer.vcxproj" /p:Platform=Win32;Configuration=Release /t:Rebuild
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34003]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 2013-11-27 오후 1:33:27.
Project "D:\Sources\filer.vcxproj" on node 1 (Rebuild target(s)).
D:\Sources\filer.vcxproj(29,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "D:\Sources\filer.vcxproj" (Rebuild target(s)) -- FAILED.


이런 때는 VisualStudioVersion 값을 잘못 지정했기 때문입니다. 예를 들어, 해당 PC에는 VS2013이 설치되어 있는데 VisualStudioVersion 값을 11.0으로 설정했기 때문입니다. msbuild가 실행되는 PC에 설치된 Visual Studio 버전을 확인하시고 그에 맞는 VisualStudioVersion 값을 설정하면 이런 문제는 없어집니다. ^^




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

[연관 글]






[최초 등록일: ]
[최종 수정일: 11/27/2013]

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

비밀번호

댓글 작성자
 



2018-05-01 11시34분
정성태

... 136  137  138  139  140  141  142  143  144  145  146  147  148  [149]  150  ...
NoWriterDateCnt.TitleFile(s)
1328정성태8/20/201233167개발 환경 구성: 163. IIS 7 - "MIME Types" 설정 아이콘이 없는 경우
1327정성태8/19/201237918Windows: 58. Windows 8 정식 버전을 설치해 보고... [14]
1326정성태8/19/201224245오류 유형: 160. Visual Studio 2010 Team Explorer 설치 오류
1325정성태8/15/201224267개발 환경 구성: 162. 닷넷 개발자가 컴파일해 본 리눅스
1324정성태8/15/201226300.NET Framework: 332. 함수형 언어의 코드가 그렇게 빠를까? [4]파일 다운로드1
1323정성태8/4/201228078.NET Framework: 331. C# - 클래스 안에 구조체를 포함하는 경우 발생하는 dynamic 키워드의 부작용 [2]
1322정성태8/3/201227709개발 환경 구성: 161. Ubuntu 리눅스의 Hyper-V 지원 (마우스, 네트워크)
1321정성태7/31/201226974개발 환경 구성: 160. Azure - Virtual Machine의 VHD 파일 다운로드 [2]
1320정성태7/30/201228947Math: 10. C# - (타)원 영역의 마우스 클릭 판단파일 다운로드1
1319정성태7/26/201227546개발 환경 구성: 159. Azure - 네트워크 포트 여는 방법 [1]
1317정성태7/24/201226396오류 유형: 159. SpeechRecognitionEngine.SetInputToDefaultAudioDevice 호출 시 System.InvalidOperationException 예외 발생
1316정성태7/18/201284511개발 환경 구성: 158. .NET 응용 프로그램에서 Oracle XE 11g 사용
1315정성태7/17/201229274개발 환경 구성: 157. Azure - Virtual Machine 구성 [2]
1314정성태7/16/201224319개발 환경 구성: 156. Azure - 2개 이상의 서비스 계정을 가지고 있을 때 프로젝트를 배포하는 방법
1313정성태7/16/201236479오류 유형: 158. Hyper-V 설치 후 VM 시작이 안되는 경우
1312정성태7/15/201236287Math: 9. 황금비율 증명
1311정성태7/15/201228978Math: 8. C# - 피보나치 수열의 사각형과 황금 나선(Golden spiral) 그리기파일 다운로드1
1310정성태7/13/201232441Math: 7. C# - 펜타그램(Pentagram) 그리기파일 다운로드1
1309정성태7/13/201230521개발 환경 구성: 155. 윈도우 운영체제에서 기본적으로 사용할 수 있는 압축 해제 방법
1308정성태7/3/201225909.NET Framework: 330. IEnumerator는 언제나 읽기 전용일까?파일 다운로드1
1307정성태6/30/201228172개발 환경 구성: 154. Sysnet, Azure를 만나다. [5]
1306정성태6/29/201228793제니퍼 .NET: 22. 눈으로 확인하는 connectionManagement의 maxconnection 설정값 [4]
1305정성태6/28/201226964오류 유형: 157. IIS 6 - WCF svc 호출 시 404 Not Found 발생
1304정성태6/27/201227776개발 환경 구성: 153. sysnet 첨부 파일을 Azure Storage에 마이그레이션 [3]파일 다운로드1
1303정성태6/26/201227249개발 환경 구성: 152. sysnet DB를 SQL Azure 데이터베이스로 마이그레이션
1302정성태6/25/201229295개발 환경 구성: 151. Azure 웹 사이트에 사용자 도메인 네임 연결하는 방법
... 136  137  138  139  140  141  142  143  144  145  146  147  148  [149]  150  ...