2017-09-06 10 views
1

ビジュアルスタジオ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

関連する問題