Skip to content

Conversation

@jviau
Copy link
Contributor

@jviau jviau commented Oct 27, 2025

Issue describing the changes in this PR

Part of #3131

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

This PR adds integration tests for the new msbuild sdk. The integration tests are self-bootstrapping. No manual setup steps are required. This PR also adds many assertion extensions for MSBuild types to AwesomeAssertions, giving a more natural way to assert in tests.

This PR also changes the error for using a TFM < net8.0 to a warning.

Copilot AI review requested due to automatic review settings October 27, 2025 17:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive integration tests for the new MSBuild SDK, enabling self-bootstrapping test execution without manual setup. The tests cover restore, build, property evaluation, and item handling scenarios. Additionally, it introduces custom assertion extensions for MSBuild types through AwesomeAssertions to provide more natural and readable test assertions.

Key Changes

  • Added integration test infrastructure with automatic MSBuild assembly resolution and custom formatters
  • Created assertion extensions for BuildOutput, BuildEventArgs, and ProjectItem types
  • Enhanced LogMessage with formatting capabilities and help keyword support

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/Azure.Functions.Sdk.Tests/Resources.resx Added test resource file containing template content for host.json, local.settings.json, and minimal Program.cs
test/Azure.Functions.Sdk.Tests/ModuleInitializer.cs Implements module initialization for MSBuild assembly resolution and custom formatters
test/Azure.Functions.Sdk.Tests/LogMessageTests.cs Added Format_KnownMessage_ReturnsMessage test and minor formatting improvements
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Restore.cs Tests for SDK restore operations including success and failure scenarios
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Properties.cs Tests verifying SDK property defaults and tooling suffix calculations
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Items.cs Tests for SDK item metadata including local.settings.json, host.json, and package references
test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Build.cs Tests for SDK build operations
test/Azure.Functions.Sdk.Tests/Integration/MSBuildSdkTestBase.cs Base class providing test infrastructure including temp directory management
test/Azure.Functions.Sdk.Tests/Integration/MSBuildExtensions.cs Extension methods for creating Azure Functions projects and executing build operations
test/Azure.Functions.Sdk.Tests/Azure.Functions.Sdk.Tests.csproj Updated project file to include MSBuild packages and SDK file copying
test/Azure.Functions.Sdk.Tests/Assertions/ProjectItemAssertions.cs Custom assertions for MSBuild ProjectItem type
test/Azure.Functions.Sdk.Tests/Assertions/FormatterResolver.cs Automatically registers custom formatters for AwesomeAssertions
test/Azure.Functions.Sdk.Tests/Assertions/BuildOutputAssertions.cs Custom assertions for BuildOutput including success/failure and issue checking
test/Azure.Functions.Sdk.Tests/Assertions/BuildEventArgsAssertions.cs Custom assertions for BuildEventArgs including SDK message matching
src/Azure.Functions.Sdk/Tasks/MSBuildLogExtensions.cs Refactored parameter names and added ToMessageImportance method, updated help keyword generation
src/Azure.Functions.Sdk/Targets/Azure.Functions.Sdk.targets Changed UnsupportedTargetFramework from Error to Warning and reorganized property definitions
src/Azure.Functions.Sdk/Strings.resx Updated AZFW0107 from Error to Warning with improved message
src/Azure.Functions.Sdk/LogMessage.cs Added Format methods and HelpKeyword property, renamed Error_UnsupportedTargetFramework to Warning_UnsupportedTargetFramework
src/Azure.Functions.Sdk/Azure.Functions.Sdk.csproj Added GetSdkFiles target and updated packaging configuration for SDK files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jviau jviau force-pushed the jviau/msbuild-sdk/integration-tests branch from c8d8997 to bb4448d Compare October 27, 2025 18:58
@jviau jviau force-pushed the jviau/msbuild-sdk/integration-tests branch from e428977 to 2e93512 Compare October 27, 2025 22:14
@liliankasem liliankasem self-requested a review October 28, 2025 17:49
@jviau jviau force-pushed the jviau/msbuild-sdk/integration-tests branch from 543836c to 19a89e1 Compare October 29, 2025 18:14
@jviau jviau force-pushed the feature/msbuild-sdk branch from 105bda6 to 4fbbb12 Compare October 30, 2025 18:44
@jviau jviau force-pushed the jviau/msbuild-sdk/integration-tests branch from 8d3b96a to 6efe069 Compare October 30, 2025 18:47
@jviau jviau merged commit aa6d775 into feature/msbuild-sdk Oct 30, 2025
64 checks passed
@jviau jviau deleted the jviau/msbuild-sdk/integration-tests branch October 30, 2025 19:57
jviau added a commit that referenced this pull request Nov 18, 2025
jviau added a commit that referenced this pull request Nov 19, 2025
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.

3 participants