Skip to content
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

Infra: Update the UTs and ITs to be able to run on .NET 9 preview #2166

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

costin-zaharia-sonarsource
Copy link
Member

@costin-zaharia-sonarsource costin-zaharia-sonarsource commented Aug 28, 2024

@terraform-techuser terraform-techuser changed the title [do not merge or review] Test AMI SCAN4NET-30 [do not merge or review] Test AMI Aug 28, 2024
@@ -826,7 +826,7 @@ public void E2E_TestProjects_ProtobufsUpdated()
// Assert
result.AssertTargetExecuted("FixUpTestProjectOutputs");

var protobufDir = Path.Combine(result.GetPropertyValue("ProjectSpecificOutDir"), "subdir1");
Copy link
Member Author

Choose a reason for hiding this comment

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

MsBuild structured logger has an issue when reading the bin files generated by .NET 9 and the property names got changed. I extracted it to a variable to ease the update when the problem will be addressed.

@@ -17,7 +17,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Build.Framework" Version="17.8.3" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.2.243" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.2.291" />
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've tried to update to the latest version but the issue is still present.

Comment on lines 18 to 20
pool:
name: .net-bubble-aws-re-team-dev
demands: EnvName -equals pr-133
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be removed before the merge to master.

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>net48</TargetFramework>
Copy link
Member Author

Choose a reason for hiding this comment

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

MsBuild 15, after .NET 9 update, fails to build the projects if they are targeting .NET Standard 2.0 or 2.1 so I've changed the target versions to either net48 if they can target a runtime or netstandard1.6 for Xamarin.

The current .NET SDK does not support targeting .NET Standard 2.0.

@costin-zaharia-sonarsource costin-zaharia-sonarsource changed the title SCAN4NET-30 [do not merge or review] Test AMI Infra: Update the UTs and ITs to be able to run on .NET 9 preview Sep 2, 2024
Copy link
Contributor

@CristianAmbrosini CristianAmbrosini left a comment

Choose a reason for hiding this comment

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

LGTM!

@costin-zaharia-sonarsource costin-zaharia-sonarsource marked this pull request as ready for review September 4, 2024 12:18
Copy link

sonarcloud bot commented Sep 4, 2024

@costin-zaharia-sonarsource costin-zaharia-sonarsource merged commit 951bb9f into master Sep 4, 2024
14 checks passed
@costin-zaharia-sonarsource costin-zaharia-sonarsource deleted the costin/test-ami branch September 4, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants