-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
.NET MAUI projects supported? #18481
Comments
I've tried the following to reproduce your issue:
The above built the application successfully, so then I tried the below, which created a database:
Could you give a bit more context on the errors that you see? Would you be able to provide a minimal repro of your issue? |
Here is an workflow that are more or less the same as we have for the real app, /~https://github.com/dhindrik/MauiCodeQL/actions/runs/12794061568 |
Thank you for the repro. This is just a progress report, not a solution yet. I looked into the debug logs of the job, and found that an exception is thrown here:
The path comes from the msbuild property This could be handled by wrapping the call with a try-catch. The generated files make analysis more precise, but could be omitted. At the same time, the compiler is reporting these kind of errors:
This only happens when the build is executed within a codeql context. The reason for this is that codeql silently modifies the build command, see here, and injects the |
@dhindrik I think we can't do much with the compilation failure caused by CodeQL also supports creating databases from msbuild binary log files. In this mode, the extractor doesn't rely on the You'd need to change your build command to generate the binary log file, and CodeQL needs to be configured to use
|
We have used CodeQL for our .NET MAUI app for a while. But last time it was running successful was 13th November. Since than it failed, even if we still was on .NET 8.
We get a lot of errors like this:
{APP_PATH}\obj\Release\net9.0-windows10.0.19041.0\win10-x64\generated\Microsoft.Maui.Controls.SourceGen\Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator\App.xaml.sg.cs'.'
I guess it is because of code generation of XAML.
So is .NET MAUI projects supported? If I look at the docs I cannot see .NET MAUI there. I a look back and I can also see that we never had any issues reported even if the run succeed.
Image from, https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/
We have an requirement to run CodeQL on all our repositories, but if it is not supported for .NET MAUI projects we need to explain it for the managers and looking for options.
The text was updated successfully, but these errors were encountered: