Skip to content

Setup Test Projects for NetCoreApp 2.1 and 3.1 #1769

@TimothyMothra

Description

@TimothyMothra

Parent #1160

Tasks - Getting Ready

  • Need to audit all test projects.
    • Is CI Build ready for this change? No, Need to add tasks for NetCoreApp 2.1 and 3.1 YES
    • Which projects are NOT ready for new frameworks? Done. Please review the Inventory Below

Tasks - Consolidate Projects

Most of these test projects were created using the net full framework csproj format and targeting a single framework. This is why you'll see the framework in the name of these projects.
It's common that the actual test classes would be in a Shared project to be reused in each individual project.
This improves maintainability and fewer projects improve compile times.

There is an additional benefit to this task. The classic net framework project has been causing dependency conflicts on the build server. converting all projects to ProjectReference projects completely mitigates this issue.

  • These projects need to be consolidated into a single (PackageReference) csproj project.
    • Note that this may include updating the references in Solutions (*.sln)
  • "Shared" projects should be removed. Test classes should be moved to the single test project.
    • This may cause some unlisted test classes to suddenly be discovered. These may or may not compile or pass. Will need to investigate each instance individually.
  • These projects need to support multi-framework targeting.

Tasks - TargetFrameworks

  • Remove netcoreapp2.0, and netcoreapp3.0
  • All test projects should include netcoreapp2.1, netcoreapp3.1
    • Our build system is designed to automatically pick up these extra compilations.

Tasks - Cleanup

Inventory

  • Microsoft.ApplicationInsights.Isolated.Tests Done
  • Microsoft.ApplicationInsights.Tests Done
  • TelemetryChannel.Nuget.Tests Not Applicable
  • TelemetryChannel.Tests Done
  • AspNetCore Functional Tests: Done
    • Delete old projects: (EmptyApp.FunctionalTests10, FunctionalTestUtils, MVCFramework.FunctionalTests10, WebApi.FuncitonalTests10) Done
    • Rename and upgrade other projects (Should target net461;netcoreapp2.1;netcoreapp3.1): Done
      • EmptyApp20.FunctionalTests20, FunctionalTestUtils20, MVCFramework20.FunctionalTests20, WebApi20.FunctionalTest20 -> "FunctionalTests..Tests" Done
  • AspNetCore: TestApp30.Tests; rename to IntegrationTests Done
  • Microsoft.ApplicationInsightsn.AspNetCore.Tests Done
  • Microsoft.ApplicationInsights.WorkerService.Tests, need to also add 3.1 to yml Done
  • DiagnosticSourceListener.netcoreapp1.Tests - Need to convert for multiple frameworks Done
  • EtwCollector.Net46.Tests - Neet to convert for multiple frameworks Done
  • EventSourceListener.netcoreapp10.Tests - Need to convert for multiple frameworks Done
  • ILogger.NetStandard.Tests - Need to convert for multiple frameworks Done
  • Log4NetAppender: Need to merge Net45 and NetCoreApp10 into a single test project Done
  • NLogTarget: Need to merge Net45 and NetCoreApp10 into a single test project Done
  • TraceListener: Need to merge Net45 and NetCoreapp10 into a single test project Done
  • DependenceCollector.Tests - Need to remove Shared projects Eddy in-progress
  • EventCounterCollector.Tests Done
  • HostingStartup.Net45.Tests - Need to convert to with newer csproj to support multiple target frameworks Done
  • PerfCounterCollector: Need to merge Net45, NetCore, NetCore20 into a single test project and remove the Shared.Tests project Eddy in-progress
    • This is going to be difficult because there are a dozen individual projects.
      • First, ignore the Shared projects and just merge the test projects into a single multi-target project. This should be easy to validate because all existing tests should pass. Done
      • Second, merge the Shared.Test with the multi-target Test project. Done
      • Third, merge the Product Perf.csproj with the Perf.Shared project. Done
      • Fourth, The remaining 6 Shared projects (NetFull, NetStandard, NetStandard.Stubs, NetStandard16.Stubs, NetStandard20, NetStandard20Net45) should be sorted into only 3: (Perf.Shared.Net45, Perf.Shared.NetStandard16, Perf.Shared.NetStandard20). ON HOLD. Wait until after we delete 1.x
  • Web.Net45.Tests: Need to convert to newer csproj to support multiple target frameworks and remove shared project Done
  • WindowsServer: Need to merge Net45 and NetCore into a single test project and remove the Shared.Tests project Done

Special Instructions.

  • Please only work on one project at a time. This will help reduce conflicts with other developers.
  • Please leave a comment stating which project you are starting.
  • Please confirm that no one else has started a project before you begin.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions