MSBuild.Community.Tasks problem with vs2017

People. I have a set of services, first created in 2012, which - for many years - have been seamlessly built with Vs2010, Vs2013 and Vs2015.

When I try to build with Vs2017, I get

The task MSBuild.Community.Tasks.Attrib cannot be loaded from the assembly. The assembly is located in the C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\MSBuildCommunityTasks , but there is no folder in the \2017\Professional\MSBuild folder MSBuildCommunityTasks .

Here is a complete mistake

 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. 

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

+10
visual-studio-2017 msbuild
source share
3 answers

Explicitly setting the MSBuildCommunityTasksPath property passes the problem.

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

(For historical reasons, we save community build tasks in our repo, so it sets the location under the torso)

 <MSBuildCommunityTasksPath>$(trunk)\Ref\Build\MSBuildCommunityTasks</MSBuildCommunityTasksPath> 
+3
source share

Extensions are most likely installed in 'C: \ Program Files (x86) \ MSBuild'. Therefore, I am currently setting the variable explicitly in my proj as a workaround.

 <MSBuildExtensionsPath>C:\Program Files (x86)\MSBuild</MSBuildExtensionsPath> 
+2
source share

Installing .Net Framework 3.5 development tools in the individual components section of VS2017 fixed my build.

0
source share

All Articles