Skip to content

Upgrade projects to .NET 10 (System.Runtime)#12801

Open
gewarren wants to merge 3 commits into
dotnet:mainfrom
gewarren:upgrade-csharp-set15
Open

Upgrade projects to .NET 10 (System.Runtime)#12801
gewarren wants to merge 3 commits into
dotnet:mainfrom
gewarren:upgrade-csharp-set15

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Contributes to #12513.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 upgrades a set of snippet projects under System.Runtime*-related APIs to target .NET 10, aligning snippet compilation with newer TFMs as part of the broader cleanup/modernization work tracked in #12513.

Changes:

  • Update many C# snippet .csproj files from net6.0 (and a couple from net48/net481) to net10.0.
  • Preserve Windows-specific targeting by moving net6.0-windows to net10.0-windows where applicable.

Reviewed changes

Copilot reviewed 63 out of 63 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
snippets/csharp/System.Runtime/MemoryFailPoint/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime/GCSettings/IsServerGC/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.Versioning/FrameworkName/op_Equality/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.Serialization/SerializationInfo/GetValue/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/Project.csproj Bumps snippet TFM to net10.0 (but snippet appears Remoting/.NET Framework-specific).
snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/TypeLibVarAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Pack/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/StructLayoutAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ProgIdAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/OptionalAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/SizeParamIndex/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/MarshalAsAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/GetLastWin32Error/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/GetLastPInvokeError/Marshal.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Marshal/FreeHGlobal/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/LCIDConversionAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/LayoutKind/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/InterfaceTypeAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/InAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/GuidAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/Project.csproj Bumps snippet TFM to net10.0-windows.
snippets/csharp/System.Runtime.InteropServices/FieldOffsetAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/PreserveSig/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/EntryPoint/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DllImportAttribute/.ctor/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DispIdAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DispatchWrapper/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/DefaultParameterValueAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ComVisibleAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ComSourceInterfacesAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ComImportAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ClassInterfaceType/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/ClassInterfaceAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/CharSet/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/CallingConvention/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/BestFitMappingAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.InteropServices/Attributes/Attributes.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/SuppressIldasmAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/StringFreezingAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Equals/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/DiscardableAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/DependencyAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/DefaultDependencyAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/CompilerGlobalScopeAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/CompilationRelaxationsAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/CallerFilePathAttribute/Project.csproj Bumps snippet TFM to net10.0.
snippets/csharp/System.Runtime.CompilerServices/AsyncStateMachineAttribute/Overview/Project.csproj Bumps snippet TFM to net10.0.

Comment thread snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/Project.csproj Outdated
@gewarren gewarren marked this pull request as ready for review June 25, 2026 20:57
@gewarren gewarren requested a review from a team as a code owner June 25, 2026 20:57
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