2017-09-06 2 views
1

Visual Studio 2017 (msbuild 15) 용 빌드 도구가 설치되었으며 솔루션을 빌드하는 데 문제가 있습니다. 빌드 도구를 설치하기 전에 프레임 워크 (4.6.1)를 설치 했으므로 현재 설치되어 있습니다.msbuild 15가 누락 된 타겟팅 프레임 워크로 인해 실패했습니다

C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1122,5): error MSB3644: 
The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. 
To resolve this, install the SDK or Targeting Pack for this framework version or 
retarget your application to a version of the framework for which you have the SDK or 
Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly 
Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly 
may not be correctly targeted for the framework you intend. 

편집 :이 경우 실제로는 msbuild의 자동 설치를 시도하고 있습니다. 그래서 UI에 액세스 할 필요가 없습니다.

답변

3

프레임 워크를 설치했는데 대상 지정 팩/"개발자 팩"은 설치하지 않았을 수 있습니다. 버전이 C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework의 서브 디렉토리로 존재하는지 확인할 수 있습니다.

Visual Studio 설치 관리자를 실행하고 VS 2017 설치에서 "수정"을 클릭하고 "개별 구성 요소"에서 빌드 할 .NET Framework 버전의 대상 지정 팩 및 SDK를 선택하여 누락 된 지원을 설치할 수 있습니다 .

+0

이 경우 클라이언트 컴퓨터에 대한 설치를 슬리밍하려고합니다. 실제로 UI에 액세스 할 수 없습니다. – sentinel21

+0

무인 설치를위한 구성 요소 ID는 https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-build-tools –

+0

에서 찾을 수 있습니다. 하지만 설치가 끝나지 않았다. (설치가 얼마되지 않아서 설치 디렉토리가 비었을 때 "Start-Process -FilePath 'vs_BuildTools.exe'-ArgumentList '--quiet', ' norestart ','--add Microsoft.Net.Component.4.6.1.TargetingPack ','--locale en-US '-wait "in powershell – sentinel21

관련 문제