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 way to LoadProject with caches ect #11234

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hknielsen
Copy link
Contributor

Fixes #
Suggestion of new API for setting ProjectOptions on created Project

Context

Setting EvaluationContext when working with Project is not optimal becuase of its interaction with the ProjectCollection.
If I create a Project with ProjectOptions I can get exception if im creating the same project multiple times, as the ProjectCollection will fail adding it to its internal lists.
To handle this best ive added a LoadProjectWithOptions on the ProjectCollection, as this will create it with the options if its not already created, making it possible to ie. setup EvaluationContext to Shared.

Changes Made

Added new method ProjectCollection.LoadProjectWithOptions

Testing

Notes

@hknielsen
Copy link
Contributor Author

@dotnet-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant