MSBuild.Community.Tasks issue with vs2017

Folks I've a set of services first created in 2012, which - down the years - have seamlessly built with Vs2010, Vs2013 & Vs2015.

When I try to build with Vs2017 I get

The MSBuild.Community.Tasks.Attrib task could not be loaded from the assembly The assembly lives under the C:Program Files (x86)Microsoft Visual Studio2017ProfessionalMSBuildMSBuildCommunityTasks folder, however there is no MSBuildCommunityTasks folder under the 2017ProfessionalMSBuild folder.

Here's the full error

C:workingMySolutionbuildBuild.proj" (default target) (1) ->
(SetAssemblyVersion target) ->
  C:workingMySolutionbuildBuild.proj(100,5): error MSB4062: The "MSBuild.Community.Tasks.Attrib" task could not be loaded from the assembly C:Program Files (x86)Microsoft Visual Studio2017ProfessionalMSBuildMSBuildCommunityTasksMSBuild.Community.Tasks.dll. 
  Could not load file or assembly 'file:///C:Program Files (x86)Microsoft Visual Studio2017ProfessionalMSBuildMSBuildCommunityTasksMSBuild.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.

What changed between Vs2015 and Vs2017?
What do I need to do to fix this?


Explicitly setting the MSBuildCommunityTasksPath property gets past the problem.

I do this at the top of my build.proj file.

(For historic reasons we keep the community build tasks in our repo, which is why it's set to a location under trunk)

<MSBuildCommunityTasksPath>$(trunk)RefBuildMSBuildCommunityTasks</MSBuildCommunityTasksPath>

The extensions are most likely installed in 'C:Program Files (x86)MSBuild'. So I currently set the variable explicitly in my proj as a workaround.

<MSBuildExtensionsPath>C:Program Files (x86)MSBuild</MSBuildExtensionsPath>
链接地址: http://www.djcxy.com/p/95810.html

上一篇: 哪里可以在模板中使用angular2中的效用函数

下一篇: MSBuild.Community.Tasks vs vs2017问题