Skip to content

C#: Add an integration test which uses MSBuild #12196

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

Merged
merged 2 commits into from
Feb 16, 2023

Conversation

mbg
Copy link
Member

@mbg mbg commented Feb 15, 2023

This PR adds an integration test for C# which uses MSBuild.

@mbg mbg added the C# label Feb 15, 2023
@mbg mbg requested a review from a team as a code owner February 15, 2023 16:26
@mbg mbg self-assigned this Feb 15, 2023
@@ -0,0 +1,4 @@
from create_database_utils import *

# force CodeQL to use MSBuild by setting `LGTM_INDEX_MSBUILD_TARGET`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will soon get rid of the LGTM_ env variables, so it would be better not to rely on them. It would be better to create a .NET Classic project, as the auto builder will then use msbuild instead of dotnet build.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that first, but I couldn't get it to work because dotnet doesn't support .NET classic. So then we need mono instead on macOS and that doesn't provide msbuild on arm64.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's do this for now then.

hvitved
hvitved previously approved these changes Feb 16, 2023
@mbg mbg force-pushed the mbg/csharp/add-msbuild-integration-tests branch from 7aed9a1 to 9db1366 Compare February 16, 2023 09:56
@mbg
Copy link
Member Author

mbg commented Feb 16, 2023

@hvitved it looks like the CI was failing to Linux/Windows because Mono (used for msbuild on those platforms) didn't support the .NET version targeted by the test project. I have lowered it and now the CI passes.

@mbg mbg merged commit 29c8260 into main Feb 16, 2023
@mbg mbg deleted the mbg/csharp/add-msbuild-integration-tests branch February 16, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants