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

added MSBuildProjectService #3080

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

Conversation

deepchoudhery
Copy link
Member

@deepchoudhery deepchoudhery commented Nov 11, 2024

Roslyn (CodeAnalysis) projects do not contain any information about MSBuild properties such as project capabilities, project tfm(s), root namespaces and so forth.

added MSBuildProjectService to help getting such properties

  • using new Microsoft.Build.Project() to initialize MSBuild project, fallback is to use ProjectCollection.GlobalProjectCollection.LoadProject
  • bulk of the logic is in MSBuildProjectServiceHelper, helps with unit testing a lot since MSBuild testing is quite annoying.
  • made MsBuildInitializer public for access, also iterating through possible sdk paths (for registration) if the first option is not found on disk.
  • initializing new found info in ProjectInfo

@deepchoudhery deepchoudhery self-assigned this Nov 11, 2024
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