I need to implement a publishing step in TFS Build deployment Process to generate the Build artifacts. We are using Gulp for our local build/publishing process, but want to try and use HPP for TFS builds. 

So first I tried to add the https://github.com/richardszalay/helix-publishing-pipeline Nuget package to my Helix website Project.

I edited the csproj of website and added the below <PropertyGroup> . I also created a new website Publishing. Project and added the same and got the same error. 

    <ItemGroup>
        <ProjectReference Include="..\..\..\Foundation\*\code\*.csproj" />
        <ProjectReference Include="..\..\..\Feature\*\code\*.csproj" />   
        <ProjectReference Include="..\..\..\Project\*\code\*.csproj" />	
      </ItemGroup>

  

    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
      <PublishProfile>Company-DEV</PublishProfile>
    </PropertyGroup>
    
    <!-- The rest can go into ProjectName.wpp.targets if you prefer -->
    <PropertyGroup>
      <AutoPublish Condition="'$(AutoPublish)' == '' and '$(Configuration)' == 'Debug' and '$(BuildingInsideVisualStudio)' == 'true' and '$(PublishProfile)' != ''">true</AutoPublish>
    
      <AutoPublishDependsOn Condition="'$(AutoPublish)' == 'true'">
        $(AutoPublishDependsOn);
        WebPublish
      </AutoPublishDependsOn>
    </PropertyGroup>


But I am getting this error - **There is a circular dependency in the target dependency graph involving target "CollectReferencesFromHelixModules".**

If I remove this line - `<ProjectReference Include="..\..\..\Project\*\code\*.csproj" />` then the error goes away.

Can anyone help to figure out why the circular dependency can be removed. I also want the Project website, bin to be generated in the build artifacts