Closed rcollina closed 1 year ago
ProjectReference
items support the AdditionalProperties
metadata which is passed as a global property during build:
<Project Sdk="Microsoft.Build.Traversal/3.0.3">
<ItemGroup>
<ProjectReference Include="/src/alpha/alpha.csproj"
AdditionalProperties="VersionSuffix=prerelease.1" />
<ProjectReference Include="/src/beta/beta.csproj"
AdditionalProperties="VersionSuffix=prerelease.2" />
</Project>
I wouldn't recommend this though as you'll get different build results if you build the individual project vs this traversal project. Unless that's what you're going for, you would want to just set these properties in the project themselves.
@jeffkl thank you, much appreciated.
I am going to use this in a CI pipeline. I have an admittedly complicated bunch of powershell scripts that act upon changes in a monorepo; they build, test and publish either nugets or container images. I'm appending a prerelease suffix depending on the commit branch.
Hello, Given the following
proj
file:Is there any way to define a set of properties for each referenced project?
In pseudocode:
What are my options here? Thank you