-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Description
I'm trying to adopt Microsoft.DotNet.Arcade.Sdk. Before adopting this, we were computing VersionPrefix, VersionSuffix, and PackageVersion properties during the Directory.Build.props file.
In Microsoft.DotNet.Arcade.Sdk, the evaluation order is different. VersionSuffix is set in Version.BeforeCommonTargets.targets which is evaluated after the project file, so I can't set PackageVersion from Directory.Build.props. As a result, I haven't found a way to make something like this work:
<TargetName>aspnetcore-runtime-$(PackageVersion)-win-$(Platform)</TargetName>Candidates and why they don't work:
- Project file
- Implicit top/bottom imports - evaluation is always too early. PackageVersion is empty
- With explicit top/bottom imports, setting the property after the Sdk.targets import. - too late
- Directory.Build.targets - too late, Microsoft.Common.targets uses TargetName to compute a handful of other properties like TargetPath. I could attempt to find everywhere TargetName is used and re-compute all derived properties, but that's likely to be fragile
- Custom import set via CustomBeforeMicrosoftCommonTargets - target is still evaluated too early, before Version.BeforeCommon.targets
@tmat - any ideas how to solve this?
Metadata
Metadata
Assignees
Labels
No labels