Hi Hassaan Faruq,
Thank you for reaching out to Microsoft Q & A forum.
This module was originally designed to use .NET SDK 6.0, meaning that the instructions and configurations are optimized for that version. However, due to recent tool updates, some packages, such as dotnet-reportgenerator-globaltool, only support .NET 8.0 or higher.
To complete the exercises smoothly, we recommend the following options:
Use .NET SDK 8.0: The latest versions of tools like ReportGenerator are only compatible with .NET 8.0. We suggest installing .NET SDK 8.0 and updating your project settings accordingly. You can download .NET SDK 8.0 from Microsoft's .NET downloads page.
1.Update the SDK version: Open the project’s .csproj file and set the target framework to net8.0:
<TargetFramework>net8.0</TargetFramework>
2.Adjust your pipeline: Update the Azure Pipelines YAML file to target .NET 8.0 by specifying dotnetSdkVersion: '8.x' in the UseDotNet@2 task:
variables:
dotnetSdkVersion: '8.x'
3.Check and update dependencies: Ensure that any dependencies, such as coverlet.msbuild and ReportGenerator, are compatible with .NET 8.0 by updating them to the latest versions.
4.Test the setup: After making these changes, run tests to confirm that code coverage reports and other functions perform correctly with .NET 8.0.
Note for Future Updates: This module may be updated to include support for newer SDKs in the future. For now, using .NET SDK 8.0 will allow you to complete the exercises without compatibility issues.
Please feel free to contact us if you have any additional questions.
If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.