-
Notifications
You must be signed in to change notification settings - Fork 376
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
[Microsoft.Build] Investigate non-deterministic test behavior #6781
Comments
Tips for investigation: |
It was not able to reproduce with release/7.0.2xx after running tests many times locally or in the pipeline.
|
In the item templates mentioned above, the bind symbol
Need to confirm the behaviors of Microsoft.Build are right or wrong. Here is the direct call from Microsoft.Build https://github.com/dotnet/sdk/blob/6c1b1f5f9e0035df7706467c63b99d264578fab0/src/Cli/dotnet/commands/dotnet-new/MSBuildEvaluation/MSBuildEvaluator.cs#L262 . |
Binlog might be very helpful here to aid investigation. |
Attached the binlog binlogs.zip. |
Seems This seems to be a culprit: https://github.com/dotnet/roslyn/blob/b059755627eb8ee45aee083c967bada95583bbfc/src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets#L6-L30 LangVersion is not set for net8 targetting. |
@GangWang01 this was confirmed as expected behavior by Roslyn team - the in-development TFM doesn't have |
@GangWang01 , if you have some time, could you check the output for project templates having the same parameters as in tests? |
Attached the generated project and debug log by running local custom tests that instantiate Console Application CSharp and Class Library CSharp output.zip without language version specified. |
In order to handle this restriction we recommend introducing a generated symbol for langVersion:
For getting more info on generated symbols check out the wiki page: https://github.com/dotnet/templating/wiki/Available-Symbols-Generators . |
Product
dotnet CLI (dotnet new)
Describe The Bug
When a new item template is instantiated, the warning "Failed to evaluate bind symbol 'langVersion', it will be skipped." is generated sometimes.
Identify what triggers this scenario.
Can be reproduced in the src/Tests/dotnet-new.Tests/DotnetClassTemplateTests.cs tests
To Reproduce
Steps:
dotnet Info
release/7.2.0xx
The text was updated successfully, but these errors were encountered: