NightOwl888 commented on PR #1222:
URL: https://github.com/apache/lucenenet/pull/1222#issuecomment-3706136304
I have made all of the updates to support Visual Studio 2022 (limited
support for contributors, excluding `net10.0`, `netstandard2.0`, and all .NET
Framework versions from the build when building inside VS 2022).
I also fixed an issue with how the scripts use the `PrintTargetFrameworks`
target. Note that this target is what requires projects to identify themselves
with `<IsTestProject>true</IsTestProject>` and why it is conditional in some
cases. This target tells the scripts which target frameworks are supported for
a specific project file after all MSBuild conditions are run. However, it was
failing because the output of MSBuild changed to include more information. The
fix was to add a key identifier for the "field" and use a Regex to parse it
rather than relying on a position in the output.
> NOTE: This fix will need to be copied to all of our other projects because
they all use the same approach to determine which target frameworks to run
tests on.
I am currently testing the local build with those changes and will report
back if there are any issues with it, but it is limited to a function that has
already been tested in the `Generate-TestWorkflows.ps1` script, so it is not
likely that it will fail.
The two test failures are real issues. One of them is similar to the issue I
reported earlier - something having to do with `CompoundFileDiretory` thread
safety on .NET 10 (I saw it happen on macOS, also). The other failure is the
ongoing issue we are having with Antlr4BuildTasks, which should be fixed after
the new version is released and we can drop the dependency on
Antlr4.CodeGenerator as well as the following probing for the `.jar` file
within that package.
```xml
<PropertyGroup>
<Antlr4CodeGeneratorVersion>$([System.IO.Path]::GetFileName('$(PkgAntlr4_CodeGenerator)'))</Antlr4CodeGeneratorVersion>
<!-- Required for Antlr4BuildTasks to find the antlr4 .jar file. When
missing,
it causes an error on the SonarCloud workflow. -->
<Antlr4ToolPath>$(PkgAntlr4_CodeGenerator)\tools\antlr4-csharp-$(Antlr4CodeGeneratorVersion)-complete.jar</Antlr4ToolPath>
</PropertyGroup>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]