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

Use empty string as key for project properties if TargetFrameworkMonitor is not found #196

Merged

Conversation

echalone
Copy link
Contributor

I have yet another Pull Request :D But I don't know if or how you want to implement this, or if you can think of a better solution.
The thing is, with Visual Studio 2022 the TargetFrameworkMoniker is no longer generated for C++ projects even though it is told so (which kinda makes sense since there's no TargetFramework for C++ projects).
This change would use an empty string as the key for project properties if the TargetFrameworkMoniker property wasn't found so the analysis can be run for non C#/Framework projects too, especially C++ projects with Visual Studio 2022.
This would mean a change of behaviour since it will now work with projects it hasn't worked with on previous Visual Studio installations too, like installer projects. We could simply accept that or we could introduce an additional optional parameter with EventProcessor class and Build method that would only allow for an empty TargetFrameworkMoniker if specifically told so.

…ker isn't found (as it is no longer generated for C++ projects with Visual Studio 2022)
@daveaglick
Copy link
Collaborator

This seems low risk, but I'll run it through all my tests before doing a release just to be sure. My only concern would be that normal builds of .NET projects produce some odd "housekeeping" logs that this would have filtered out prior. Otherwise, this looks like another nice low-risk update that expands Buildalyzer use cases - thanks!

@daveaglick daveaglick merged commit a71b5ba into phmonte:main Jan 19, 2022
@echalone
Copy link
Contributor Author

Again, thank you, that really helps us :)

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