Skip to content

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

@maridematte
Copy link
Member

Hi @hknielsen, Could you please either file an issue or explain more about the scenario that you are trying to achieve?

This is so we can review your PR, otherwise we do not have enough context for it and it will get closed. Please refer to our contribution guide for PRs in the future.

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.

2 participants