Skip to content

Allow opting into ThisAssembly.Project via the ProjectProperty MSBuild property - #507

Merged
kzu merged 1 commit into
mainfrom
dev/projectproperty-as-property
Aug 27, 2026
Merged

Allow opting into ThisAssembly.Project via the ProjectProperty MSBuild property#507
kzu merged 1 commit into
mainfrom
dev/projectproperty-as-property

Conversation

@kzu

@kzukzu commented Aug 27, 2026

Copy link
Copy Markdown
Member

File-based apps can set MSBuild properties with #:property, but they cannot declare ProjectProperty items. ThisAssembly.Project only emitted constants for those items, so ThisAssembly.Project.MSBuildProjectDirectory failed to compile from an Aspire/file-based AppHost.

PrepareProjectProperties now includes $(ProjectProperty) as-is as @(ProjectProperty) items. Semicolon-separated names work the same as an item Include. File-based usage:

#:packageThisAssembly.Project
#:property ProjectProperty=MSBuildProjectDirectory

Existing item-based opt-in is unchanged. Tests cover the property path with a semicolon-separated list.

@kzukzu added the enhancement New feature or request label Aug 27, 2026
@kzu
kzu enabled auto-merge (rebase) August 27, 2026 01:43
@kzu
kzuforce-pushed the dev/projectproperty-as-property branch from 8ca0199 to cc003eaCompareAugust 27, 2026 01:44
@kzu

kzu commented Aug 27, 2026

Copy link
Copy Markdown
MemberAuthor

34 passed34 passed

🧪 Details on Microsoft Windows 10.0.26100

from retest v1.1.0 on .NET 10.0.11 with 💜 by @devlooped

@kzu
kzu merged commit 22010ac into mainAug 27, 2026
6 checks passed
@kzu
kzu deleted the dev/projectproperty-as-property branch August 27, 2026 01:47
This was referenced Aug 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@kzu