microsoft / MSBuildSdks

MSBuild project SDKs
MIT License
460 stars 82 forks source link

Microsoft.Build.Traversal SDK doesn't traverse the project tree with PublishContainer target #565

Open oats4goats opened 2 months ago

oats4goats commented 2 months ago

Hey!

I'm now exploring the PublishContainer target for my CI pipeline (sdk-container-builds). I have a tree of projects and I can build the containers by running dotnet cli from inside the leafs without use of traversal sdk.

However when I use a .proj file in the root of my tree (generated by dotnet-affected tooling) to build and publish all the affected projects in my tree, the job doesn't even start.

It seems to be checking Publishable and EnableSdkContainerSupport props in the said .proj file, which are false by default, and then skips publishing the containers altogether without traversing the tree and reaching the leafs with the properly configured props in .csproj files.

Is it an intended behavior?

Thanks for looking into this!

-- Mitya