Skip to content

Upgrade target framework from .NET 6 to .NET 8#1526

Open
alinpahontu2912 wants to merge 1 commit intodotnet:mainfrom
alinpahontu2912:upgrade/dotnet8
Open

Upgrade target framework from .NET 6 to .NET 8#1526
alinpahontu2912 wants to merge 1 commit intodotnet:mainfrom
alinpahontu2912:upgrade/dotnet8

Conversation

@alinpahontu2912
Copy link
Member

  • Update all projects from net6.0 to net8.0 (keeping netstandard2.0 where applicable)
  • Update NuGet package projects and package paths for net8.0
  • Suppress CS8981 warning for intentional lowercase type names (torch, nn, optim, etc.)
  • Update CI pipelines to use .NET 8 SDK
  • Bump version to 0.106.1

- Update all projects from net6.0 to net8.0 (keeping netstandard2.0 where applicable)
- Update NuGet package projects and package paths for net8.0
- Suppress CS8981 warning for intentional lowercase type names (torch, nn, optim, etc.)
- Update CI pipelines to use .NET 8 SDK
- Bump version to 0.106.1
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

Upgrades the repository’s .NET target frameworks and build infrastructure from .NET 6 to .NET 8, updates NuGet packaging paths accordingly, and bumps the package version to 0.106.1 while documenting the release.

Changes:

  • Retarget projects (including tests/examples) from net6.0 to net8.0 while keeping netstandard2.0 where applicable.
  • Update NuGet packaging TFMs/paths to net8.0 and update CI pipelines to install/use .NET 8 SDK.
  • Suppress CS8981 repo-wide to accommodate intentional lowercase public type names (torch, nn, optim, etc.), and bump version/release notes to 0.106.1.

Reviewed changes

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

Show a summary per file
File Description
test/TorchSharpTest/TorchSharpTest.csproj Retarget test project to net8.0 (and net472 on Windows).
test/TorchSharpTest.WithCudaBinaries/TorchSharpTest.WithCudaBinaries.csproj Retarget CUDA test project to net8.0 (and net472 on Windows).
test/Directory.Build.props Default test target framework updated to net8.0 (plus net48 on Windows).
src/TorchVision/TorchVision.csproj Retarget library to net8.0;netstandard2.0.
src/TorchSharp/TorchSharp.csproj Retarget core library to net8.0;netstandard2.0.
src/TorchAudio/TorchAudio.csproj Retarget library to net8.0;netstandard2.0.
src/FSharp.Examples/FSharp.Examples.fsproj Retarget examples to net8.0.
src/Examples/Examples.csproj Retarget examples to net8.0.
src/Examples.Utils/Examples.Utils.csproj Retarget examples utilities to net8.0.
pkg/TorchVision/TorchVision.nupkgproj Update package TFMs and buildTransitive/lib paths to net8.0.
pkg/TorchSharp/TorchSharp.nupkgproj Update package TFMs and buildTransitive path to net8.0.
pkg/TorchSharp-cuda-windows/TorchSharp-cuda-windows.nupkgproj Update package TFMs/paths and TFM-conditional item group to net8.0.
pkg/TorchSharp-cuda-linux/TorchSharp-cuda-linux.nupkgproj Update package TFM/paths and TFM-conditional item group to net8.0.
pkg/TorchSharp-cpu/TorchSharp-cpu.nupkgproj Update package TFMs/paths and TFM-conditional item group to net8.0.
pkg/TorchAudio/TorchAudio.nupkgproj Update package TFMs and buildTransitive/lib paths to net8.0.
pkg/FileRestitcher/FileRestitcher.Tests/FileRestitcher.Tests.csproj Retarget test project to net8.0 (and net472 on Windows).
build/ci/job-template.yml CI template now installs .NET SDK 8.x.
build/BranchInfo.props Version bump to 0.106.1 and previous package version updated.
azure-pipelines.yml Pipeline updated to use .NET 8 SDK and related comments updated.
RELEASENOTES.md Add release notes entry for 0.106.1 describing the upgrade and warning suppression.
Directory.Build.props Suppress CS8981 repo-wide via NoWarn.

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

inputs:
packageType: sdk
version: 6.x
version: 8.x
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The UseDotNet SDK version is set to the floating range 8.x. That can change the exact SDK patch used over time and make CI behavior less reproducible. Consider pinning to a specific SDK version (e.g., 8.0.1xx/8.0.2xx) or aligning with whatever version you choose elsewhere in the pipeline so all jobs build with the same SDK.

Suggested change
version: 8.x
version: 8.0.2xx

Copilot uses AI. Check for mistakes.
inputs:
packageType: sdk
version: 6.x
version: 8.x
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

CI uses both 8.0.x and 8.x for UseDotNet. Mixing these can lead to different SDK patch selections across jobs and make failures hard to reproduce. Consider standardizing on one version spec (and ideally pinning to a specific SDK patch) across all UseDotNet steps.

Suggested change
version: 8.x
version: 8.0.x

Copilot uses AI. Check for mistakes.
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.

1 participant