Avoid executing source generators outside of an Azure Functions project#2119
Avoid executing source generators outside of an Azure Functions project#2119
Conversation
…/azure-functions-dotnet-worker into shkr/fix-exten-startup-gen
|
Reading the linked issue, the root cause is that the SDK package ref is transitively included in the xunit project, so it too includes all those targets. Disabling the source generators this way mitigates a piece of the problem, but it is larger than that. The better fix is to just not include that package transitively. This can be done via:
So, I am not sold this is absolutely necessary because even with this I would still advise customers to perform option 1. This won't cause any harm including it, but it isn't right to say the root problem is solved with this change (there are still other SDK targets that could cause issues being brought in). |
While I agree with the above, the fact that this update introduces an issue that will lead to confusion and require a project change leads to a poor experience, so we should avoid that. Whether the approach is what's scoped here (which I agree, shouldn't cause problems) or something else, that's less important, but we need to ensure an SDK reference update within the same major won't break users' builds. |
resolves #2114
Pull request checklist
release_notes.mdAdditional PR information