2017-04-07 9 views
7

フォークス2012年に初めて作成された一連のサービスは、Vs2010、Vs2013、Vs2013、Vs2013、Vs2015とシームレスに構築されています。MSBuild.Community.Tasks with vs2017

私はVs2017を構築しようとした際、私はMSBuild.Community.Tasks.AttribタスクはアセンブリがC:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\MSBuildCommunityTasksフォルダの下に住んでいるアセンブリ からロードすることができませんでした

を取得するには、どんなにMSBuildCommunityTasksフォルダがありません\2017\Professional\MSBuildフォルダの下にあります。

ここVs2015とVs2017の間で何が変わった完全なエラー

C:\working\MySolution\build\Build.proj" (default target) (1) -> 
(SetAssemblyVersion target) -> 
    C:\working\MySolution\build\Build.proj(100,5): error MSB4062: The "MSBuild.Community.Tasks.Attrib" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.dll. 
    Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.dll' or one of its dependencies. 
    The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. 

ですか?
これを解決するには何が必要ですか?

+1

主な変更点はインストールパスです。スタンドアロンのビルドツールをインストールする場合を除いて、エディションフォルダを含むVSフォルダの下にネストされました。リリースノートについては、[MSBuild release notes](https://docs.microsoft.com/en-us/visualstudio/msbuild/what-s-new-in-msbuild-15-0)を参照してください。 あなたの問題は、ターゲットが正しい新しい場所に配置されていないことが原因である可能性があります。 Azure SDKのgit [MSBuildの問題](https://github.com/Microsoft/msbuild/issues/1888)に問題があり、試してみてください。 –

+0

ありがとうSiobhan、私は月曜日にそれをチェックします –

+0

あなたはそれを探しているところで 'MSBuildCommunityTasks'をコピーできます。つまり、C:¥Program Files(x86)¥MSBuild¥MSBuildCommunityTasks'をC:¥Program Files(x86)¥Microsoft Visual Studio¥2017¥Community¥MSBuild'にコピーします。 – wal

答えて

3

MSBuildCommunityTasksPathプロパティを明示的に設定すると問題が解決します。

これは私のbuild.projファイルの先頭で行います。

(歴史的な理由から、私たちは私たちのレポでコミュニティビルドタスクを保つ、それはトランクの下の位置に設定している理由である)

<MSBuildCommunityTasksPath>$(trunk)\Ref\Build\MSBuildCommunityTasks</MSBuildCommunityTasksPath> 
1

拡張が最も可能性が高い「Cにインストールされています:\プログラムファイル( x86)\ MSBuild 'を実行します。だから私は現在、回避策として私のprojで明示的に変数を設定します。

<MSBuildExtensionsPath>C:\Program Files (x86)\MSBuild</MSBuildExtensionsPath>