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

The presence of a (.rsp) file causes problems. #211

Closed
chibanemourad opened this issue Aug 9, 2022 · 3 comments
Closed

The presence of a (.rsp) file causes problems. #211

chibanemourad opened this issue Aug 9, 2022 · 3 comments

Comments

@chibanemourad
Copy link

Hello
First of all, thank you for this very useful tool.
I noticed that the presence of a .rsp file containing /bl argument in the tree structure of a .csproj causes a problem when calling the Build() method on a ProjectAnalyzer.

I pushed a repository to reproduce the bug here: AutoResponseFileIssueRepro

@daveaglick
Copy link
Collaborator

Interesting, thanks for the repro!

I'm assuming you're talking about a Directory.Build.rsp file? As far as I know a MSBuild.rsp wouldn't get picked up if it's not in the same directory as MSBuild itself. But I guess either way, the problem is really that the /bl flag is conflicting with the logging configuration Buildalyzer has to do.

To be honest I'm not sure how that can be resolved. Buildalyzer works at a foundational level by running MSBuild and instrumenting it with a custom logger that feeds build events back to Buildalyzer over a pipe (which Buildalyzer can then collect and analyze). Given that an .rsp file defines the behavior of MSBuild when run, and if that .rsp file has anything that conflicts with what Buildalyzer is doing, I can see how they'd be incompatible. I've just got no ideas on how to fix it :/. Any thoughts?

@daveaglick
Copy link
Collaborator

I guess we could globally disable response files when Buildalyzer is run. That's not ideal because the .rsp might have other important flags, but it's probably better than crashing or breaking.

@daveaglick
Copy link
Collaborator

Fix is committed and will go out with the next release (not sure when that'll be, probably later this week or next).

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

No branches or pull requests

2 participants