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

kzu merged 1 commit into
mainfrom
dev/projectproperty-as-property

Conversation

@kzu

@kzu kzu 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:

#:package ThisAssembly.Project
#:property ProjectProperty=MSBuildProjectDirectory

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

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

kzu commented Aug 27, 2026 •

Copy link
Copy Markdown
Member Author

34 passed 34 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 main Aug 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 free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant