Buildoutputs attribute does not have assembly names

68 Views Asked by At

enter image description here

I am using Msbuild to build my solution [We will pass the solution names instead of csproj names]. In the above picture solution folder [Configuration,Source, Tests] has few projects and 3 projects having no solution folder.

We used to obtain Buildoutputs from Msbuild task as given below

 <MSBuild Projects="@(Solution)" BuildInParallel="true"
                 Properties="Configuration=$(Configuration);PostbuildEvent=;Version=$(BuildNextVersionNumber)"
                 Condition="'%(Solution.Group)' == '$(Group)' And '%(Solution.Type)' == 'DotNET' And '%(Solution.IsRebuild)'=='$(IsRebuild)'">

      <Output
                      TaskParameter="TargetOutputs"
                      ItemName="BuildOutputs" />
    </MSBuild>

But the assemblies produced by projects which are outside the solution folder doesn't added into Buildoutputs item.

We are solving this issue by building projects instead of sln.

Why this occurs? Is there any other easy way to rectify it?

1

There are 1 best solutions below

0
On

Try to print all Solution groups using Message task to check if there is some 'root' group for the projects not included in any solution folder. Or if there is no root group, try to build it using empty group in your condition: '%(Solution.Group)' == ''