-
Notifications
You must be signed in to change notification settings - Fork 451
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
Race condition in ExtensionsMetadataGenerator.targets leads to incorrect TargetDir #4057
Comments
it's defined too early (Azure#4057)
Okay, after a discussion on PR #4059 about the issue I'm at the point where I believe a fix is roughly the following:
That's producing a solid An update to ExtensionsMetadataGenerator to lazy evaluate the properties could fix some issues where it's directly referenced, but there are knock-on effects given ExtensionsMetadataGenerator has an odd Share and Enjoy |
I've just released 1.0.25 to nuget: https://www.nuget.org/packages/Microsoft.NET.Sdk.Functions/1.0.25 which now updates everything to use ExtensionsMetadataGenerator 1.0.2 so this should now work. Please give that a try -- I'm pretty sure this addresses the issue here so I'm closing this issue. However, the underlying "hardcoded version" issue isn't fixed. I've created Azure/azure-functions-vs-build-sdk#277 to track the fixing of this. |
And thank you @TomBonnerAtTFL for working through this with me! If you think this doesn't address everything, feel free to re-open this. |
Investigative information
Repro steps
Referencing
Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator
should create anextensions.json
file within our TargetDir. Currently, referencing both this, andMicrosoft.Net.SDK.Functions
leads to the incorrect TargetDir being used in the Generation part of this project.Expected behavior
The file
extensions.json
should be generated in the correct TargetDir directory, with the correct values.Actual behavior
A variety of things happen depending on the specific order of events, but most resolve into an empty
extensions.json
file being outputted somewhere.Known workarounds
Putting a custom
.targets
file within your project.Related information
I'm fairly sure this is the cause of a lot of issues given I believe (of course I could be wrong) this bug is referenced in the following:
I have a pull-request which I'll attach shortly.
The issue is mostly caused by https://github.com/Azure/azure-functions-vs-build-sdk/blob/master/src/Microsoft.NET.Sdk.Functions.MSBuild/Targets/netstandard1.0/Microsoft.NET.Sdk.Functions.Build.targets#150 changing the TargetPath which (given the Property's in the current Extension.Targets are set at start) means that the ConsoleApp within ExtensionsMetadataGenerator executes over the wrong directory.
PS, my apologies for re-creating this, the original was under my personal GitHub account @moritonal
The text was updated successfully, but these errors were encountered: