variablesmsbuildmsbuildcommunitytasks

Issue with MSBuild.Community.Tasks.Targets


I am trying to build with msbuild.

The following lines are present in MSBuild.Community.Tasks.Target

<PropertyGroup>
    <MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)' == ''">$(MSBuildExtensionsPath)\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
     <MSBuildCommunityTasksLib>$([MSBUILD]::Unescape($(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll))</MSBuildCommunityTasksLib>
</PropertyGroup>

During build I am printing the value of

MSBuildCommunityTasksPath,MSBuildExtensionsPath and MSBuildExtensionsPath.

The values are :

 MSBuildExtensionsPath: C:\Program Files (x86)\MSBuild
 MSBuildCommunityTasksPath: C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks
 MSBuildCommunityTasksLib: \MSBuild.Community.Tasks.dll

Why is MSBuildCommunityTasksLib not getting the value

C:\Program Files (x86)\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.dll


Solution

  • I think the UNESCAPE may be throwing you for a loop.

    Try the simpler:

      <PropertyGroup>
        <MSBuildCommunityTasksPath Condition="'$(MSBuildCommunityTasksPath)' == ''">$(MSBuildExtensionsPath)\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
        <MSBuildCommunityTasksLib>$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.dll</MSBuildCommunityTasksLib>
      </PropertyGroup>