Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial check for missing Aspire.Hosting package #512

Merged
merged 3 commits into from
Oct 26, 2023

Conversation

danegsta
Copy link
Member

This adds a check in the Aspire workload to ensure that the Aspire.Hosting package reference is present (by way of the Aspire capability which will only be set by Aspire.Hosting going forward). The intention is to provide a more helpful error message in the event an AppHost project is missing the package ref than the default error CS0234: The type or namespace name 'Hosting' does not exist in the namespace 'Aspire' (are you missing an assembly reference?) message.

@danegsta
Copy link
Member Author

Updated the error to a warning (and added a specific code) to match the warning format used in #472

@danegsta danegsta merged commit caa49f4 into main Oct 26, 2023
4 checks passed
@danegsta danegsta deleted the danegsta/capabilityCheck branch October 26, 2023 18:02
eerhardt pushed a commit that referenced this pull request Oct 27, 2023
* Add initial check for missing Aspire.Hosting package

* Update to be consistent with other proposed build warnings

* AppHost instead of Host
@github-actions github-actions bot locked and limited conversation to collaborators Apr 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants